Repository navigation
Description
What happens. In mode: all, the default, publish-gh-pages uploads the site with actions/upload-pages-artifact@v5 and deploys it with actions/deploy-pages@v5 in the same job. deploy-pages finds the artifact by name through the artifact service's listing, looks once, and fails with No artifacts named "github-pages" were found for this workflow run when the listing doesn't show it yet. Upstream tracks this as actions/deploy-pages#451, open since 2026-10-07. Reports there say it has become frequent since about 2026-11-22. One reporter measured it in a minimal repository on 2026-11-25: the artifact took 0.44 to 5.75 seconds to appear, and the first lookup missed in 4 of 8 runs; in one production run it took about 46 seconds. A lookup under a second after a miss reads the same stale listing. Checking the REST API's artifact list first doesn't help, since deploy-pages reads a different service's listing.
Seen here. QuantEcon/test-lecture-theme-sphinx's publish run 45751593375, on 2026-11-26, calls publish-gh-pages@v0 in mode: all. The github-pages artifact finalized at 03:58:05.39 UTC, and 0.71 seconds later the lookup found the run's two other artifacts but not that one. QuantEcon/test-lecture-theme-mystmd, which called the two upstream actions in one job, failed the same way on 2026-11-25 (run 45706993700) and now deploys in a job of its own, with the artifact named per run attempt (QuantEcon/test-lecture-theme-mystmd#18). QuantEcon/test-lecture-theme-sphinx#20 moves the Sphinx corpus to this action's split modes.
A re-run doesn't recover it. Re-running the job repeats the upload, and the lookup then finds two github-pages artifacts, one per attempt, which deploy-pages also refuses: attempt 2 of run 45706993700 failed with Multiple artifacts named "github-pages" were unexpectedly found for this workflow run. Artifact count is 2. The way back is a new run.
Who it reaches. Eight lecture sites' publish.yml call publish-gh-pages@v0 with the default mode: all and create-release-assets: 'true': lecture-python.myst, lecture-python-intro, lecture-python-advanced.myst, lecture-dp, lecture-jax, lecture-python-programming, lecture-python-programming.fr and continuous_time_mcs. Their latest publish runs, between 2026-07-14 and 2026-11-23, were all green, so none has met it yet. When the deploy fails, the site stays on its previous build, the tag gets no release assets (so restore-gh-pages has nothing to restore for it), and the steps after it, such as the notebooks repository's sync, are skipped. Seven of the eight publish only on a pushed tag, so recovering takes a new tag; lecture-dp also has a manual trigger. QuantEcon/test-actions-lecture-intro's publish workflow and release gate split the work across jobs (mode: upload, then mode: deploy); in its run 44974469205 that put about 17 seconds between the upload and the lookup, which narrows the race but doesn't close it.
Proposal. In mode: all and mode: deploy, retry the deploy after a wait when it fails before creating a deployment.
- The deploy step runs with
continue-on-error. If it fails and itspage_urlis empty, whichdeploy-pagessets as soon as it creates a deployment, a second attempt runs after about 15 seconds, then a third after about 60, each only on the same condition. A deployment that was created and then failed is not retried, so nothing deploys twice. - A step after the attempts fails the job if none succeeded, before the release assets step, so a failed deploy still skips the release assets and the success summary as it does now. When a later attempt succeeds, a warning names it and Intermittent "No artifacts named github-pages" when deploy-pages runs right after upload-pages-artifact in the same job actions/deploy-pages#451; the failed attempt's error annotations stay in the log.
- One step picks the URL of the attempt that succeeded, for the
page-urloutput and the summary. - In
mode: all, the action names the artifact for the run attempt (for instancegithub-pages-<attempt>), so that a re-run of a job whose attempts all failed deploys its own upload. No new input. - The manual's troubleshooting entry for
No artifacts named "github-pages", which now covers onlymode: deploywithout an upload, gains this case. - Shown in QuantEcon/test-actions-lecture-intro, which has a Pages site: a
mode: deployin a run that uploaded nogithub-pagesartifact misses on every attempt, so it shows the attempts and the waits, and that the job still fails. This repository has no Pages site, so its harness can't reach the deploy; it shows thatuploadandreleaseare unchanged. - A comment ties the retries to Intermittent "No artifacts named github-pages" when deploy-pages runs right after upload-pages-artifact in the same job actions/deploy-pages#451, to be removed once
deploy-pagesretries long enough by itself or deploys by artifact id (Add support for artifact_id input and improve artifact selection for … actions/deploy-pages#399, open since 2025-06). fix: retry artifact discovery after upload actions/deploy-pages#455 retries the lookup for 15 seconds, which wouldn't have covered the 46-second case; it is open, with no review from a maintainer.
renovatebot/renovate#48395, merged 2026-11-25, does much the same in a workflow: it retries only the deploy, after any failure, with waits of 5, 20 and 60 seconds. With this proposal, a deploy that succeeds the first time runs as now, and one that would otherwise fail takes at most a little over 75 seconds more (about 15 if the second attempt succeeds). A deploy that fails before creating a deployment for another reason, such as a missing id-token: write, is tried three times before the job fails.
Not in this proposal. An artifact-name input for the split modes, where a re-run of both jobs would meet the same two-artifact refusal; it can follow. Moving each lecture site to the split modes, as templates/publish.yml already does, which keeps the Pages permissions out of the job that runs the notebooks and is worth doing for that reason, but doesn't close the race.
The action harness meets the same lag in actions/download-artifact. Runs 45081991163, 45333177052, 45817036699 and 45904276568 failed in publish-gh-pages' own publish-modes job, downloading the github-pages artifact it had just uploaded, and runs 44612303038, 45081991163, 45811935092 and 46121155138 failed in the build-jupyter-cache and build-lectures failure-guard jobs, all with Artifact not found in attempt 1. actions/download-artifact#505 reports a related intermittent failure. So the harness's download-artifact steps that read an artifact uploaded earlier in the same run get the same wait-and-retry: a first try with continue-on-error, then a second after about 15 seconds and a third after about 60, each only if the one before failed. In publish-modes, whose download already runs with continue-on-error and whose assert step reads its outcome, the assert accepts whichever attempt succeeded. It goes in the same pull request, or in a small one beside it.
Claude Code (on behalf of mmcky)
Activity