Skip to content

Commit 6b713dc

Browse files
authored
Merge pull request #698 from mattxwang/master
docs: hosts autogenerated docs on GitHub Pages via Actions, updates README
2 parents 45c2726 + 74f82ff commit 6b713dc

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build and Deploy Docs
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
build-and-deploy-docs:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2.3.1
12+
- name: Setup Node.js
13+
uses: actions/setup-node@v2
14+
with:
15+
node-version: '14.x'
16+
# Pre-check to validate that versions match between package.json
17+
# and package-lock.json. Needs to run before npm install
18+
- name: Validate package.json and package-lock.json versions
19+
run: node version-check.js
20+
- name: Install dependencies
21+
run: npm ci
22+
- name: Build docs
23+
run: npm run docs
24+
25+
- name: Deploy docs
26+
uses: JamesIves/github-pages-deploy-action@4.1.4
27+
with:
28+
branch: gh-pages # The branch the action should deploy to.
29+
folder: docs # The folder the action should deploy.

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![Build Status](https://github.com/kubernetes-client/javascript/workflows/Kubernetes%20Javascript%20Client%20-%20Validation/badge.svg)](https://github.com/kubernetes-client/javascript/actions)
44
[![Client Capabilities](https://img.shields.io/badge/Kubernetes%20client-Gold-blue.svg?style=flat&colorB=FFD700&colorA=306CE8)](http://bit.ly/kubernetes-client-capabilities-badge)
55
[![Client Support Level](https://img.shields.io/badge/kubernetes%20client-beta-green.svg?style=flat&colorA=306CE8)](http://bit.ly/kubernetes-client-support-badge)
6+
[![Build and Deploy Docs](https://github.com/kubernetes-client/javascript/actions/workflows/deploy-docs.yml/badge.svg)](https://github.com/kubernetes-client/javascript/actions/workflows/deploy-docs.yml)
67

78
The Javascript clients for Kubernetes is implemented in
89
[typescript](https://typescriptlang.org), but can be called from either
@@ -99,9 +100,14 @@ const k8sApi = kc.makeApiClient(k8s.CoreV1Api);
99100
...
100101
```
101102

102-
# Additional Examples
103+
# Additional Examples and Documentation
103104

104-
There are several more examples in the [examples](https://github.com/kubernetes-client/javascript/tree/master/examples) directory.
105+
There are several more JS and TS examples in the [examples](https://github.com/kubernetes-client/javascript/tree/master/examples) directory.
106+
107+
Documentation for the library is split into two resources:
108+
109+
1. The [Kubernetes API Reference](https://kubernetes.io/docs/reference/) is the source-of-truth for all Kubernetes client libraries, including this one. We suggest starting here!
110+
2. The Typedoc autogenerated docs can be viewed [online](https://kubernetes-client.github.io/javascript) and can also be built locally (see below)
105111

106112
# Compatibility
107113

0 commit comments

Comments
 (0)