Skip to content

ci: build and deploy docs to GitHub Pages on release - #66

Open
dylanjm wants to merge 2 commits into
mainfrom
ci/docs-pages
Open

dylanjm wants to merge 2 commits into
mainfrom
ci/docs-pages

Conversation

@dylanjm

@dylanjm dylanjm commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #67

Summary

Adds .github/workflows/docs.yml, which publishes the Sphinx docs to https://idaholabresearch.github.io/DCAF/ whenever a GitHub release is published (nothing runs on pushes or PRs).

  • build: checks out the release tag, runs uv sync --locked, builds the docs with sphinx-build -b html docs docs/_build/html, and uploads the HTML with actions/upload-pages-artifact@v5.
  • deploy: publishes the artifact with actions/deploy-pages@v5 to the github-pages environment.
  • Permissions are least-privilege: contents: read for the workflow, and pages: write + id-token: write only on the deploy job. A single pages concurrency group stops two deploys from running at once.

Required one-time setup (repo admin)

  1. Settings → Pages → Build and deployment → Source: "GitHub Actions". Until this is set, the deploy job fails with "Pages site not found".
  2. Settings → Environments → github-pages → Deployment branches and tags: add a tag rule matching the release tags (e.g. v*). This environment is created when step 1 is done and only allows the default branch at first. Release runs come from the tag ref, so without this rule the deploy is rejected with "Tag ... is not allowed to deploy to github-pages due to environment protection rules".

Test plan

  • sphinx-build -b html docs <out> succeeds locally (4 existing, non-fatal warnings: the missing _static dir and the unknown mermaid Pygments lexer)
  • pre-commit run --all-files passes
  • After merge and setup: publishing a release runs the Docs workflow and the site loads

🤖 Generated with Claude Code

dylanjm and others added 2 commits October 28, 2026 09:49
Adds a Docs workflow that builds the Sphinx HTML on every push and pull
request to main, and deploys it to GitHub Pages on pushes to main (or a
manual run from main).

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@dylanjm dylanjm changed the title ci: build docs and deploy to GitHub Pages ci: build and deploy docs to GitHub Pages on release Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish documentation to GitHub Pages on release

1 participant