Repository navigation
Description
What happened. v0.22.0's staged release deployed QuantEcon/test-actions-lecture-intro's Pages site three times in five minutes, all from one commit, 131a21a:
publish.yml, on the pushed tagpublish-2026-11-28(run 46137601696, 10:59 UTC). The site then served that build.deploy-release, dispatched onmainwithtag=publish-check-310: a rollback (run 46137974451, 11:02 UTC). The site then servedpublish-check-310's files.deploy-releaseagain, on thereleaseevent of re-publishing thepublish-2026-11-28release (run 46138067837, 11:04 UTC).
The third run was green. Its upload job restored publish-2026-11-28, built from 131a21a, and its own github-pages artifact holds those files. Its deploy job logged "Created deployment for 131a21a…" and "Reported success!", and GitHub lists that deployment as the active one, with status success. But 18 minutes later, files that nobody had requested yet came straight from the origin (x-cache: MISS, age: 0), and every one was publish-check-310's, with last-modified inside the second deploy's window. The third deploy changed nothing.
The cause, as far as we can tell. actions/deploy-pages creates each Pages deployment with pages_build_version set to GITHUB_SHA (src/internal/context.js), and it has no input to change that. GitHub's REST reference, "Create a GitHub Pages deployment", calls the field "A unique string that represents the version of the build for this deployment", and defaults it to GITHUB_SHA. A commit isn't unique across runs at one commit. deploy-pages logged the commit as the deployment's ID and polled its status by it. So the third run's "Reported success!" may describe the second deploy, not its own.
The trigger event matters, not only the shared commit. Here a dispatch at a commit already deployed took effect, and a release event didn't. actions/deploy-pages#383, open since 2024-12-21, reports the same: deploys on release events at a commit already deployed are dropped while marked success, and workflow_dispatch and workflow_call deploys land. Older reports there say tag pushes and scheduled runs failed too, though nobody has re-tested those since.
Who it reaches.
deploy-release: a release event runs at its tag's commit. A release whose tag points at a commit already deployed meets this, after a rollback dispatch, for instance, or after an earlier release at the same commit. The second is the usual case for a series repository whose site is built elsewhere and whose own commits don't change.publish-gh-pages: its deploy can meet it when it runs on a tag push or a schedule at a commit already deployed, as reported upstream. Re-runs are untested.- In every case the run is green, since neither action checks the site after deploying.
Proposal, for v0.22.1 beside #359:
- Neither direct fix is available. A step can't set
GITHUB_SHAfor an action: GitHub's variables reference says an assignment to a defaultGITHUB_*variable "is ignored". Calling the Pages API directly with a non-commit build version is reported to return 404 (pages_build_version(GITHUB_SHA) is not unique for events that use last commit e.g.release,workflow_dispatch, etc. actions/deploy-pages#383, and a community discussion). - The candidate fix is the workaround from
pages_build_version(GITHUB_SHA) is not unique for events that use last commit e.g.release,workflow_dispatch, etc. actions/deploy-pages#383. On areleaseevent,deploy-releasedoesn't deploy in that run. It dispatches itself (workflow_dispatch) with the release's tag, and the dispatched run deploys. That's the kind of deploy that landed here. The pull request settles the details: the token a dispatch needs, how the release run reports the dispatched run, and the template's permissions. - Check that the site serves what was deployed, or have the chapter say how a caller checks.
- Prove it on the canary with a release-event deploy at a commit already deployed, checked by files nobody has requested yet. The Pages CDN ignores a query string, so a
?cb=value doesn't bypass its cache. publish-gh-pages' exposure on tag pushes and schedules is re-tested on the canary as part of the same work, and fixed or documented.
Claude Code (on behalf of mmcky)
Activity
mmcky commentedon Nov 28, 2026
This is the normal case for a series whose site is built in QuantEcon/lectures, not an edge case. QuantEcon/lectures#103's publish workflow creates each release in the series repository, as
publish-<date>with a letter for a second publish that day, so the tag lands at the series repository's default-branch head. After its cutover, a series repository gets no commits of its own, since its site is built elsewhere. So every release after the first is at a commit already deployed, and its release-event deploy would be dropped while marked success.That makes the fix here a prerequisite for every series' cutover, not only for QuantEcon/project-monorepo#27's rehearsal. The candidate fix, a dispatch on the default branch with
tagset to the release's tag, still deploys the release being published. The rehearsal's check will be two publishes on one day at the same commit, with the site read back after each.Claude Code (on behalf of mmcky)
ci(deploy-release): the caller at @v0, now that v0 is QuantEcon/actio…
docs: the canary staging route's limits until #366, and TESTING's sta…