Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 4 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,7 @@ jobs:
env:
RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install docs dependencies
run: cd docs && npm ci
- name: Run prebuild
run: cd docs && npm run prebuild
- name: Create version snapshot
run: cd docs && npx docusaurus docs:version "${RELEASE_VERSION}"
env:
RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }}
- name: Commit versioned docs
if: ${{ github.event.inputs.dry_run != 'true' }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs/versions.json docs/versioned_docs/ docs/versioned_sidebars/
git commit -m "docs: snapshot version ${REF_NAME}" || echo "No changes to commit"
git push
env:
REF_NAME: ${{ github.ref_name }}
# TODO(versioned-docs): capture a per-release docs snapshot here in
# the future. It should be committed via the version-bump PR (so it
# goes through CLA and branch protection) rather than pushed to main
# from this workflow.
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ examples/package-lock.json
kubernetes-client-node-*.tgz
**/*.swp
.idea/
docs/*
.DS_Store

# Docusaurus
website/.docusaurus
website/build
website/node_modules
# Docs: generated output is ignored via docs/.gitignore (build/, node_modules,
# .docusaurus, docs/api-reference, docs/sdk, docs/models). Future versioned
# snapshots (docs/versioned_docs, docs/versioned_sidebars, docs/versions.json)
# are intentionally NOT ignored so they can be committed. See README.md.

# Link-check scratch dir (created by docs CI to stage build under baseUrl)
_linkcheck/
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ Documentation is built with [Docusaurus](https://docusaurus.io/) and includes:

- SDK Reference (KubeConfig, Watch, Informer, Exec, etc.)
- Kubernetes API Reference (all API groups)
- Version selector for historical releases
- [Kubernetes API Reference](https://kubernetes.io/docs/reference/) — source-of-truth for all Kubernetes client libraries

## Preview docs locally
Expand All @@ -120,7 +119,7 @@ npm start # opens http://localhost:3000 with hot-reload

`npm start` automatically runs the `prestart` hook which generates the API
reference, SDK docs, and model pages from source before launching the dev
server. Changes to hand-written docs (e.g. `docs/docs/examples/`) are
server. Changes to hand-written docs (e.g. `docs/docs/examples/`) are
reflected instantly; changes to the generated sources require restarting the
server.

Expand All @@ -134,6 +133,12 @@ npm run serve # preview the production build at http://localhost:3000

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

> **TODO (versioned docs):** In the future the docs site will keep a snapshot of
> the reference for each stable release, selectable via a version dropdown. This
> isn't wired up yet — the site currently serves the latest (`main`) docs only.
> When added, snapshots will be committed in the version-bump PR rather than
> pushed from the release workflow.

# Compatibility

Prior to the `0.13.0` release, release versions did not track Kubernetes versions. Starting with the `0.13.0`
Expand Down
Loading