Description
Rel: #190
Add a CI workflow to automatically build and deploy the documentation UI (docs/) to GitHub Pages when changes are pushed to main.
Current Status
The documentation is built with webpack 5 + vanilla JS (located in docs/). It renders the OpenAPI spec (auto-generated via utoipa) into an interactive API reference with endpoint explorer, Send Request, cURL generation, data schemas, guides, and search. Currently it can only be built and viewed locally.
Suggested Solution
Create a new workflow (e.g. .github/workflows/docs.yml) which:
-
runs on pushes to main and PRs targeting main, but only when files in docs/ change
-
it includes the following jobs (using actions/upload-pages-artifact + actions/deploy-pages):
Job 1 - build-docs:
- Checks out the repo
- Sets up Node.js 20
- Caches and installs npm dependencies in
docs/
- Runs npm run build (webpack) to produce
docs/dist/
- On main branch only: uploads
docs/dist/ as a GitHub Pages artifact
Job 2 - deploy-docs:
- Only runs on main (not PRs)
- Uses the official actions/deploy-pages action to deploy the built artifact to GitHub Pages
Key difference from the old sidecar deployment process:
- No separate branch to maintain
- No GitHub App tokens or force pushes needed
- No manual git commit / git push to gh-pages in CI
- Built-in deployment status tracking in GitHub's Environments UI
- Officially recommended by GitHub for new setups
Prerequisites
- Set GitHub Pages source to GitHub Actions (Settings > Pages > Source)
- Ensure openapi.json in
docs/ is up to date before merging docs changes (generated via npm run update-spec from a running server)
Checks before making docs public
Description
Rel: #190
Add a CI workflow to automatically build and deploy the documentation UI (docs/) to GitHub Pages when changes are pushed to main.
Current Status
The documentation is built with webpack 5 + vanilla JS (located in
docs/). It renders the OpenAPI spec (auto-generated via utoipa) into an interactive API reference with endpoint explorer, Send Request, cURL generation, data schemas, guides, and search. Currently it can only be built and viewed locally.Suggested Solution
Create a new workflow (e.g.
.github/workflows/docs.yml) which:runs on pushes to main and PRs targeting main, but only when files in
docs/changeit includes the following jobs (using
actions/upload-pages-artifact+actions/deploy-pages):Job 1 - build-docs:
docs/docs/dist/docs/dist/as a GitHub Pages artifactJob 2 - deploy-docs:
Key difference from the old sidecar deployment process:
Prerequisites
docs/is up to date before merging docs changes (generated vianpm run update-specfrom a running server)Checks before making docs public
v0.1.0)pallets-constants.mdandpallets-constants.mdin guides are internal and are not shown in the docs UI