Skip to content

Commit

Permalink
Merge pull request #698 from mattxwang/master
Browse files Browse the repository at this point in the history
docs: hosts autogenerated docs on GitHub Pages via Actions, updates README
  • Loading branch information
k8s-ci-robot authored Jul 16, 2021
2 parents 45c2726 + 74f82ff commit 6b713dc
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build and Deploy Docs
on:
push:
branches:
- master
jobs:
build-and-deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.1
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
# Pre-check to validate that versions match between package.json
# and package-lock.json. Needs to run before npm install
- name: Validate package.json and package-lock.json versions
run: node version-check.js
- name: Install dependencies
run: npm ci
- name: Build docs
run: npm run docs

- name: Deploy docs
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs # The folder the action should deploy.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Build Status](https://github.com/kubernetes-client/javascript/workflows/Kubernetes%20Javascript%20Client%20-%20Validation/badge.svg)](https://github.com/kubernetes-client/javascript/actions)
[![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)
[![Client Support Level](https://img.shields.io/badge/kubernetes%20client-beta-green.svg?style=flat&colorA=306CE8)](http://bit.ly/kubernetes-client-support-badge)
[![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)

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

# Additional Examples
# Additional Examples and Documentation

There are several more examples in the [examples](https://github.com/kubernetes-client/javascript/tree/master/examples) directory.
There are several more JS and TS examples in the [examples](https://github.com/kubernetes-client/javascript/tree/master/examples) directory.

Documentation for the library is split into two resources:

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!
2. The Typedoc autogenerated docs can be viewed [online](https://kubernetes-client.github.io/javascript) and can also be built locally (see below)

# Compatibility

Expand Down

0 comments on commit 6b713dc

Please sign in to comment.