Documentation Publishing
The ZPLC documentation is built using Docusaurus and automatically deployed to GitHub Pages via GitHub Actions.
The Deployment Pipeline
The pipeline is defined in .github/workflows/docs-deploy.yml and runs as Deploy Docusaurus to GitHub Pages. It handles both pull requests and pushes to the main branch.
Pull Requests (Validation)
When a PR is opened that modifies the docs/ directory:
- The CI pipeline installs dependencies.
- It runs
bun run validate:v1.5-docsand thenbun run build. - Crucially, Docusaurus is configured with
onBrokenLinks: 'throw'. If your PR introduces a broken internal link, a missing markdown import, or invalid frontmatter, the build will fail, blocking the merge.
Merges to Main (Deployment)
When changes are pushed to main (or master):
- The CI pipeline performs the build validation step.
- It uploads the
docs/builddirectory as an artifact. - A subsequent job deploys that artifact directly to the
github-pagesenvironment.
Release Procedure
To publish new documentation:
- Make your changes in a feature branch.
- Run
cd docs && bun run validate:v1.5-docslocally to verify manifest parity and generated references. - Open a Pull Request.
- Wait for the
Build Documentationjob in Deploy Docusaurus to GitHub Pages to pass. - Merge the PR or push the approved change to
main. GitHub Actions will uploaddocs/buildand deploy it to GitHub Pages automatically.
Versioning a Release
When the ZPLC project hits a release milestone (for example, v1.5.0), you should take a snapshot of the documentation.
- Create a branch for the release.
- Run
cd docs && bun run docusaurus docs:version 1.5.0. - Commit the new
versions.jsonand theversioned_docs/folder. - Merge the PR.
Rollback Procedure
If a bad deployment reaches production:
- Identify the commit hash of the last known good documentation state on the
mainbranch. - Use
git revert <bad-commit-hash>to undo the changes. - Push the revert directly to
main(or via a rapid PR). The CI pipeline will rebuild and deploy the previous working state.