Documentation Deployment
This project uses Material for MkDocs and mike to publish versioned documentation to GitHub Pages.
Overview
Two GitHub Actions workflows publish the docs:
| Workflow | Trigger | Publishes |
|---|---|---|
publish-dev-docs.yml |
Push to develop |
Development docs |
publish-docs.yml |
Published GitHub release | Stable release docs |
The published docs are stored in the gh-pages branch.
Development docs
The publish-dev-docs.yml workflow runs whenever changes are pushed to develop.
It:
- Checks out the repository
- Fetches the existing
gh-pagesbranch - Configures Git author information for the deployment commit
- Installs the Python documentation dependencies
- Runs:
This publishes the current
developbranch documentation as thedevelopversion on GitHub Pages.
Stable release docs
The publish-docs.yml workflow runs when a GitHub release is published.
It:
- Checks out the repository
- Fetches the existing
gh-pagesbranch - Configures Git author information for the deployment commit
- Reads the release tag from GitHub
- Installs the Python documentation dependencies
- Runs:
This publishes the release documentation under the release version and updates the
latestalias to point to that release.
Version layout
The site typically contains:
| Version | Purpose |
|---|---|
develop |
Docs for ongoing development |
latest |
Docs for the most recent stable release |
x.y.z |
Docs for a specific release tag |
Local documentation build
You can build the docs locally with:
If you want to test version publishing locally, usemike commands in a Git repository with the gh-pages branch available.
Notes
- The workflows require write access to the repository so they can update
gh-pages. fetch-depth: 0is used somikecan work with full git history.- The
gh-pagesbranch is not edited manually, it is managed by the deployment workflows.
Troubleshooting
If the docs do not appear as expected:
- confirm the workflow completed successfully
- check that
gh-pageswas updated - verify the correct version folder was published
- confirm the GitHub Pages site is configured to use the
gh-pagesbranch