Documentation Deployment Workflow
File: .github/workflows/docs.yml
Purpose
Automatically builds and deploys documentation to GitHub Pages whenever docs are updated on main.
How It Works
Automatic Trigger
Fires on push to main when any of these paths change:
docs/**- Any documentation filezensical.toml- Documentation config file
Manual Trigger
Invoke via workflow_dispatch to rebuild and redeploy docs on demand.
Steps
- Configure GitHub Pages using
actions/configure-pages - Checkout repository at the current commit
- Setup Python 3.14 runtime
- Install zensical documentation builder via pip
- Build site with
zensical build --clean --cleanflag removes previous build artifacts- Outputs built site to
site/directory (by default) - Upload pages artifact from
site/directory - Deploy to GitHub Pages (environment:
github-pages)
Outputs
The workflow deploys to GitHub Pages and outputs the deployment URL (available in steps.deployment.outputs.page_url).
Permissions Required
contents: read- Read repository content during buildpages: write- Deploy to GitHub Pagesid-token: write- Generate OIDC token for Pages deployment
Documentation Structure
The documentation is built from the docs/ directory using zensical and the configuration in zensical.toml.
Key folders:
docs/dev/- Developer experience (tools, setup, branching)docs/platform/- Platform and infrastructure architecturedocs/services/- Service specifications and endpointsdocs/thinking/- Decisions, narrative, and journey docs
Site Output
The built site is output to the site/ directory with:
site/index.html- Homepagesite/**/*.html- Rendered documentation pagessite/assets/- CSS, JavaScript, and imagessite/search.json- Search indexsite/sitemap.xml- Sitemap for crawlers
Configuration
Documentation build behavior is configured in:
zensical.toml- Site title, theme, structure, build optionsdocs/folder layout - Navigation structure (folders map to navigation)
Automatic Build on Changes
This workflow automatically re-deploys the site whenever:
- Documentation files change on
main - Configuration changes (e.g., theme updates to
zensical.toml) - Manually triggered via
workflow_dispatch
No documentation is "staged" or "pending" - all docs on main are live on the public Pages site.
Related Workflows
Documentation deployment is independent of the release pipeline. It can happen on its own schedule and does not depend on service version bumps or artifact publishing.