Background
The current docs publishing workflow (scripts/dev/push_doc_site.sh) builds the site with properdocs build and force-pushes it as a single-commit orphan to the gh-pages branch. This works well and keeps the repo lean, but it only supports one version at a time.
Goal
Support multiple doc versions (e.g. v2.0, v2.1) with a version-switcher in the Material theme, without bloating the main flygym repo with large binary assets (STL meshes, MuJoCo WASM, Three.js).
Chosen approach: separate GitHub repository for gh-pages
Create a dedicated repo (e.g. NeLy-EPFL/flygym-docs) to serve GitHub Pages. Key points:
- The main
flygym repo is never touched by doc deployments — clone size stays lean
- Use
mike for versioned deploys: mike deploy --push --update-aliases <version> latest
mike incrementally commits per-version subdirectories to the docs repo's gh-pages branch; history accumulates there but it's isolated
- The Material theme version-switcher reads a
versions.json that mike maintains automatically
- The manual deploy workflow (
push_doc_site.sh) stays in control — mike is just a CLI call that replaces the current git-init/force-push block
What needs to change
- Create
NeLy-EPFL/flygym-docs (or similar), enable GitHub Pages on it
- Move the
CNAME (neuromechfly.org) to the new repo — DNS is unchanged
- In
push_doc_site.sh, replace the manual git-init/force-push block (~10 lines) with mike deploy --push [--update-aliases <version> latest] <version>, pointing at the new repo's remote
- Add a few lines to
properdocs.yml to enable the Material version-switcher (extra.version.provider: mike)
- Add
mike to dev dependencies
Notes
- The version is read automatically from
pyproject.toml. The script then prompts:
- Confirm or override the version label (allows entering e.g.
2.1.1 (dev) freely)
- Whether to update the
latest alias (answer n for dev/pre-release deploys)
- WASM mesh assets (
wasm/viewer/assets/, wasm/game/assets/) only need to be regenerated when the fly model or viewer/game config changes — not on every deploy. The script already handles this correctly.
- The manual pre-deploy checks (notebook state, local preview) are fully preserved.
- The first deploy needs a clean start on the new repo (no migration of the existing unversioned
gh-pages content needed).
Background
The current docs publishing workflow (
scripts/dev/push_doc_site.sh) builds the site withproperdocs buildand force-pushes it as a single-commit orphan to thegh-pagesbranch. This works well and keeps the repo lean, but it only supports one version at a time.Goal
Support multiple doc versions (e.g. v2.0, v2.1) with a version-switcher in the Material theme, without bloating the main
flygymrepo with large binary assets (STL meshes, MuJoCo WASM, Three.js).Chosen approach: separate GitHub repository for
gh-pagesCreate a dedicated repo (e.g.
NeLy-EPFL/flygym-docs) to serve GitHub Pages. Key points:flygymrepo is never touched by doc deployments — clone size stays leanmikefor versioned deploys:mike deploy --push --update-aliases <version> latestmikeincrementally commits per-version subdirectories to the docs repo'sgh-pagesbranch; history accumulates there but it's isolatedversions.jsonthatmikemaintains automaticallypush_doc_site.sh) stays in control —mikeis just a CLI call that replaces the current git-init/force-push blockWhat needs to change
NeLy-EPFL/flygym-docs(or similar), enable GitHub Pages on itCNAME(neuromechfly.org) to the new repo — DNS is unchangedpush_doc_site.sh, replace the manual git-init/force-push block (~10 lines) withmike deploy --push [--update-aliases <version> latest] <version>, pointing at the new repo's remoteproperdocs.ymlto enable the Material version-switcher (extra.version.provider: mike)miketo dev dependenciesNotes
pyproject.toml. The script then prompts:2.1.1 (dev)freely)latestalias (answernfor dev/pre-release deploys)wasm/viewer/assets/,wasm/game/assets/) only need to be regenerated when the fly model or viewer/game config changes — not on every deploy. The script already handles this correctly.gh-pagescontent needed).