ci: deploy docs and coverage via GitHub Pages pipeline - #286
Conversation
The shared docs-and-coverage workflow publishes by pushing a commit to the gh-pages branch with JamesIves/github-pages-deploy-action. That commit is unsigned, so the repository ruleset requiring verified signatures on gh-pages rejects the push and the job fails. Replace the reusable workflow call with a local job that runs the same build, docs, coverage and badge steps, then publishes through the official Pages pipeline (configure-pages, upload-pages-artifact, deploy-pages). This uploads an artifact instead of pushing a branch commit, so the signature rule no longer applies. Requires the repository Pages source to be set to "GitHub Actions". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVQ7VL2PnxZcxTU4AZt43h
|
pnpm exec changesetto create a changeset. |
Coverage report
Test suite run success130 tests passing in 30 suites. Report generated by 🧪jest coverage report action from 9e52c21 Show full coverage report
|
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved blocking issues were identified.
Pull request overview
Replaces branch-based docs and coverage publishing with GitHub Pages artifact deployment.
Changes:
- Runs build, docs, coverage, and badge generation locally.
- Uploads and deploys the assembled site via GitHub Pages.
- Adds required permissions, environment, and concurrency settings.
File summaries
| File | Description |
|---|---|
.github/workflows/coverage-report.yml |
Implements the docs, coverage, and GitHub Pages deployment pipeline. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Problem
The
Generate docs and coverage reportworkflow has been failing onmain(run 34493565515).The shared
dx-team-toolkit/docs-and-coverage.ymlworkflow publishes by pushing a commit to thegh-pagesbranch withJamesIves/github-pages-deploy-action. That commit is unsigned, and a repository ruleset now requires verified signatures ongh-pages, so the push is rejected:Build, tests, and docs generation all passed — only the deploy step failed.
Change
Replace the reusable workflow call with a local job that runs the same steps (pnpm install → build → docs → coverage → badges → assemble
gh-pages/), then publishes through the official Pages pipeline:actions/configure-pages@v6actions/upload-pages-artifact@v5actions/deploy-pages@v5This uploads an artifact rather than pushing a branch commit, so the signature rule no longer applies. Also adds the
pages: write/id-token: writepermissions, apagesconcurrency group, and thegithub-pagesenvironment that the Pages deployment needs.Required manual step⚠️
The repository Pages source must be switched from Deploy from a branch (
gh-pages) to GitHub Actions under Settings → Pages → Build and deployment → Source.deploy-pagesfails without it.Once the first deploy is green the
gh-pagesbranch is no longer used and can be deleted.Verification
Ran the pipeline steps locally on this branch:
pnpm build— okpnpm run docs— html generated at./docspnpm test:coverage— 130/130 tests pass,coverage/lcov-reportandcoverage/coverage-summary.jsonproducedmv docs/* ./gh-pages+mv coverage/lcov-report ./gh-pages/coverageassembly produces the expected treeWorkflow YAML parses, and every action version referenced was confirmed to exist upstream.
Alternatives considered
Excluding
gh-pagesfrom the signed-commits ruleset, or adding a GitHub Actions bypass entry, would also fix the failure with a smaller diff. This approach was chosen instead because it removes the branch push entirely and keeps the ruleset intact.Note this stops the repo from tracking the shared toolkit workflow, so future improvements there will need to be ported manually.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CVQ7VL2PnxZcxTU4AZt43h
Generated by Claude Code