fix(release): dispatch the docs deploy instead of relying on release: published - #717
Conversation
… published The docs site has never deployed itself. docs.yml declares release: published, but the release job creates the release with the default GITHUB_TOKEN, and GitHub does not start workflow runs for events that token raises. That trigger has fired zero times in the repo's history: docs.yml has 96 pull_request runs and 4 workflow_dispatch runs, and no release runs at all. Every release through v0.6.2 published its docs by hand. The v* tag policy added on the github-pages environment in #715 was a real and separate bug, since the deploy runs against the tag ref and would have been refused, but it was not why nothing ran. Fixing it made a manual dispatch against the tag work for the first time; it could not make the trigger fire. release.yml now dispatches docs.yml against the release tag once the release exists. workflow_dispatch is exempt from the recursion guard. The job is gated on update_latest like bump-version, so a patch cut on an older line cannot republish the site from its tag, and it fails loudly rather than warning, since a silent miss is what left the site four versions behind. The declared trigger stays on docs.yml because a release published by hand in the UI does fire it. RELEASING.md described only the tag policy and claimed the next release would deploy itself. It now separates the two conditions and records that the trigger does not fire on its own, plus the command to republish a tag after a docs hotfix. Verified: actionlint clean, site builds with all internal links valid. v0.6.2's docs are already live, dispatched by hand against the tag.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
🤖 ThrillhouseBot PR SummaryWhat this PR doesAdds a `publish-docs` job to release.yml that dispatches the Docs workflow against the release tag after `verify`/`release`/`promote` complete, gated on `update_latest`, because `release: published` never fires for pipeline-created releases (the GITHUB_TOKEN recursion guard). It also rewrites docs/RELEASING.md and adds comments in docs.yml documenting that the trigger only fires for hand-published releases.
|
| File | Change | Summary |
|---|---|---|
.github/workflows/docs.yml |
Modified | Comment-only change clarifying that the release:published trigger fires only for hand-published releases. |
.github/workflows/release.yml |
Modified | Adds publish-docs job that dispatches docs.yml against the release tag, gated on update_latest. |
docs/RELEASING.md |
Modified | Rewrites the publishing-the-docs section: dispatch vs trigger, tag policy requirement, manual republish command. |
Risk Assessment
| Risk | Count |
|---|---|
| 🔴 Critical | 0 |
| 🟠 High | 0 |
| 🟡 Medium | 1 |
| 🔵 Low | 0 |
Things to double-check
1 lower-confidence finding
- MEDIUM: Comment claims step fails loudly on deploy failure, but dispatch does not monitor the run (
.github/workflows/release.yml:354) (low confidence — verify before acting)
⚠️ Required CI Checks Status
Some required checks are still pending or have failed:
| Check | Type | Status | Detail |
|---|---|---|---|
| dependency-review | check-run | ⏳ Pending | - |
| frontend | check-run | ⏳ Pending | - |
| test | check-run | ⏳ Pending | - |
| format | check-run | ⏳ Pending | - |
| trivy | check-run | ⏳ Pending | - |
Automated review by ThrillhouseBot. Reply with /review to re-run.
There was a problem hiding this comment.
ThrillhouseBot noted 1 lower-confidence item(s) under Things to double-check in the PR summary (not posted as inline threads):
- MEDIUM: Comment claims step fails loudly on deploy failure, but dispatch does not monitor the run (
.github/workflows/release.yml:354)
The comment at lines 352-353 asserts that this step surfaces the github-pages protection-rule failure:# protection rules". Failing here is deliberate — a silent miss is/# what let the site sit four versions behind.But the code at line 354,gh workflow run docs.yml --repo "$GITHUB_REPOSITORY" --ref "$TAG", only creates the workflow run: GitHub CLI's documented behavior is thatgh workflow runexits as soon as the dispatch is accepted and does not wait for or report the run's outcome (verify withgh workflow run --help). The "not allowed to deploy to github-pages" failure the comment describes happens inside the dispatched docs.yml deploy job, after this step has already exited 0, so the whole release pipeline stays green while the live site silently stays stale — the exact silent miss the change claims to eliminate. The step does fail loudly for dispatch-time errors (bad ref, missing workflow_dispatch), so the primary fix is effective; the gap is specifically deploy-stage failures. Either watch the dispatched run (resolve its run id, e.g.gh run list --workflow docs.yml --branch "$TAG", thengh run watch --exit-status) or correct the comment and RELEASING.md to state that deploy-stage failures surface only in the Docs workflow's Actions tab, not in release.yml.
…the dispatch The job dispatched docs.yml and exited, with a comment claiming it would fail loudly on a deploy failure. It would not: gh workflow run returns as soon as GitHub accepts the dispatch, and the failure this job exists to catch happens later, inside the deploy — most likely the github-pages environment refusing the tag. The release pipeline would have gone green while the site stayed stale, which is the silent miss the job was added to end, moved one step later rather than removed. The job now waits for the run and fails with it. The dispatch returns no run id, so the run is resolved by polling for a docs.yml run on the tag created at or after the dispatch; the created-after bound keeps an earlier manual republish of the same tag from being mistaken for this one. Not finding a run within five minutes is itself an error, since a dispatch that produced nothing is the case the poll exists to catch. Reported by the reviewer on this PR.
🤖 ThrillhouseBot — changes since the last review
|
|



What type of PR is this?
Description
The docs site has never deployed itself, including for v0.6.2 just now.
docs.ymldeclaresrelease: published, but thereleasejob creates the release with the defaultGITHUB_TOKEN, and GitHub does not start workflow runs for events that token raises — the samerecursion guard already documented for the bump PR. The trigger has fired zero times in the
repo's history:
Every release through v0.6.2 published its docs by hand.
On the
v*tag policy from #715. That was a real and separate bug — the build runs against thetag ref, so the deploy would have been refused by the
github-pagesenvironment even if the eventhad fired. But it was not why nothing ran, and my note in that PR saying the next release would
deploy itself was wrong. What it did fix is the manual path: dispatching against a tag works now for
the first time, which is how v0.6.2's docs went live.
The fix. A
publish-docsjob inrelease.ymldispatchesdocs.ymlagainst the release tag oncethe release exists.
workflow_dispatchis exempt from the recursion guard. Three details:update_latest, likebump-version. The live site tracks the highest release, so apatch cut on an older line must not republish the site from its tag.
release, so the docs never go live for a version whose release did not complete.The declared
release: publishedtrigger stays ondocs.yml, because a release published by hand inthe UI does fire it. Its comment now says so instead of implying it is the live path.
docs/RELEASING.mddescribed only the tag policy and claimed the next release would deploy itself.It now separates the two conditions, records that the trigger does not fire on its own, and gives the
command to republish a tag after a docs hotfix.
Related Issues
Follows #715, which added the
github-pagestag policy and the docs-freeze procedure.How Has This Been Tested?
Manual testing
actionlint .github/workflows/release.yml .github/workflows/docs.yml→ cleannpm run buildinwebsite/→ all internal links validThe dispatch path itself was exercised by hand against
v0.6.2(
gh workflow run docs.yml --ref v0.6.2): build and deploy both succeeded, and the live site nowserves v0.6.2 with v0.6.0 and v0.6.1 in the picker
End to end, the
publish-docsjob can only be proven by the next releaseNo production code changes.
Checklist