ci: deploy docs site on release publish instead of every unstable push - #1210
Conversation
Docs merged to unstable went live at anchor.sigmaprime.io before any released binary had the documented flags, and each release window advertised download URLs that 404 until the release was published. Deploy on release publish instead, serialize deploys under a constant concurrency group, and fix the arch-less Linux download example that the version-sync regex was mangling. Closes sigp#1209
|
@claude, please take a look |
|
Claude finished @shane-moore's task in 1m 28s —— View job PR Review: Deploy docs on release publish
Reviewed against Workflow (
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #1210 +/- ##
=========================================
Coverage 62.98% 62.98%
=========================================
Files 162 162
Lines 27235 27235
=========================================
Hits 17154 17154
Misses 10081 10081
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| cache: 'npm' | ||
| cache-dependency-path: docs/package-lock.json | ||
|
|
||
| - name: Install dependencies |
There was a problem hiding this comment.
low priority but I noticed no timeout on this job. Timeout is dangerous potentially with aws s3 sync --delete as we'd rather not corrupt the bucket in the case where the job gets axed as that is running. we could though add timeout-minutes: 10 or similar to steps that have external fetches like Install dependencies and Install Playwright browsers independently to stop hangs blocking our other deploys.
There was a problem hiding this comment.
Good call. Added timeout-minutes: 10 to the three network-bound steps (npm ci, Playwright install, and the GitHub stats fetch in sync-version) in b2e6b9b. Left the job-level timeout off for the reason you gave: it could cancel the S3 sync mid-run. A hang now fails before the sync starts instead of holding the concurrency group for the 6h default.
|
Queued — the merge queue status continues in this comment ↓. |
Cap npm ci, Playwright install, and the GitHub stats fetch at 10 minutes so a hang fails the job before the S3 sync instead of holding the docs-deploy concurrency group for the 6h default. No job-level timeout on purpose: it could cancel the sync mid-run.
Merge Queue Status
This pull request spent 48 minutes 25 seconds in the queue, including 28 minutes 2 seconds running CI. Required conditions to merge
|
Problem, Evidence, and Context (Required)
unstable, so docs for unreleased CLI flags go live weeks before a binary exists, and during each release window the site advertises versioned download URLs that 404 (the version bump merges tounstablebefore the release is published).Change Overview (Required)
docs.ymlnow triggers onrelease: published(prerelease-guarded) plus a bareworkflow_dispatchfor manual redeploys; deploys serialize under a constant concurrency group withcancel-in-progress: falseso an in-flights3 sync --deleteis never killed halfway.sync-version.jsfilename regexes drop the greedy optional suffix group that swallowed the architecture component; the installation example is now arch-qualified; the docs README documents the new publication timing.docs.yml(the behavior change), thensync-version.js+installation.mdx(content fix), thenREADME.md.Risks, Trade-offs, and Mitigations (Required)
stable(default branch) at the next release; until then the live site freezes at its current content (status quo, self-corrects at next release publish).stableandgh workflow run docs.yml --ref stable.stable.Validation (Required)
actionlintclean on the modified workflow;node --checkclean onsync-version.js.anchor-v1.1.0-x86_64-...becameanchor-vX.Y.Z-...).Rollback (Required for behavior or runtime changes; optional otherwise)
unstablepush. No data or config impact; the S3 bucket is fully rewritten by any subsequent deploy.