docs: publish versioned documentation to GitHub Pages - #75
Draft
dengqiaoyu wants to merge 1 commit into
Draft
Conversation
Contributor
Author
dengqiaoyu
force-pushed
the
u/qiaoyu_deng/docs-improve
branch
4 times, most recently
from
August 21, 2026 18:09
3607263 to
c5f56d2
Compare
- Serve one doc set per version: `/main/` rebuilt on every push to `main`, `/vX.Y.Z/` published when a GitHub Release is created, and `/` redirecting to `/main/`. Publishing one version rewrites only its own directory, so each release keeps the docs it shipped with. - `docs/scripts/assemble_versioned_site.py` assembles the site in two phases because the version picker is rendered into every page at build time: `plan` computes the version list before Sphinx runs, `assemble` installs the built HTML afterwards. - Fail closed rather than silently dropping docs. `actions/deploy-pages` replaces the *entire* artifact each run, so a truncated `gh-pages` checkout would take published releases offline; `assemble` aborts when the tree lacks a version its own `versions.json` lists, or holds a directory the picker cannot reach. - Track `docs/src/api/index.md` and guard it with a verify-only `check-api-doc-coverage` hook, mirroring the internal repo. Run `make render-api-index` to regenerate. - Add `make test-docs` as a pull-request gate (mirroring internal `docs-build-check`) and `make docs-open-multiversions` to preview the published layout locally. - Install pandoc into the repo's gitignored `.local/bin` instead of `/usr/local`, so the docs build needs no root. Unprivileged CI runners cannot write a system prefix, and extracting the upstream tarball's root-owned entries there failed the build. `PATH` is exported from the Makefile because `make docs` ensures pandoc and runs `sphinx-build` in separate recipe lines.
dengqiaoyu
force-pushed
the
u/qiaoyu_deng/docs-improve
branch
from
August 21, 2026 20:41
c5f56d2 to
b39c19b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




/main/rebuilt on every push tomain,/vX.Y.Z/published when a GitHub Release is created, and/redirecting to/main/. Publishing one version rewrites only its own directory, so each release keeps the docs it shipped with.docs/scripts/assemble_versioned_site.pyassembles the site in two phases because the version picker is rendered into every page at build time:plancomputes the version list before Sphinx runs,assembleinstalls the built HTML afterwards.actions/deploy-pagesreplaces the entire artifact each run, so a truncatedgh-pagescheckout would take published releases offline;assembleaborts when the tree lacks a version its ownversions.jsonlists, or holds a directory the picker cannot reach.docs/src/api/index.mdand guard it with a verify-onlycheck-api-doc-coveragehook, mirroring the internal repo. Runmake render-api-indexto regenerate.make test-docsas a pull-request gate (mirroring internaldocs-build-check) andmake docs-open-multiversionsto preview the published layout locally.