Documentation Versioning¶
The documentation site supports versioning using the mike tool, which manages versions on the gh-pages branch.
Quick Start¶
-
Deploy a stable release (e.g., 1.0) and set as latest/default:
./scripts/docs-version.sh 1.0
-
Deploy a development (nightly) version:
./scripts/docs-version.sh dev dev
-
List versions locally:
mike list
CI/CD¶
The workflow .github/workflows/docs.yml automatically deploys versioned docs: - Tag push vX.Y.Z → deploys version X.Y.Z, updates latest, and sets it as default - Push to main → deploys dev version with dev alias
Note: Configure GitHub Pages to serve from the gh-pages branch in repository settings (Pages → Build and deployment → Source → Deploy from a branch).
mkdocs.yml¶
Versioning is enabled in MkDocs via:
This activates the version selector in the Material theme.
Tips¶
- Use semantic versions for tags:
v1.0.0 - Keep
latestpointing to the newest stable release - Use
devfor rolling documentation on the main branch -
Clean up old versions if needed:
mike delete 0.9 --push
Troubleshooting¶
- Version selector missing: Ensure Material theme is used and
extra.version.provider: mikeis set - “gh-pages” not updating: Confirm CI has
contents: writepermission and pushes succeed - Wrong site source: Switch repository Pages source to “Deploy from a branch” using
gh-pages