Repository navigation
ci(docs): retry the GitHub Pages deployment when it fails - #361
Merged
Merged
Conversation
`deploy-pages` looks up the `github-pages` artifact once, right after `upload-pages-artifact` finalizes it, and the artifact service may not list it yet (actions/deploy-pages#451). Pages also fails a deployment now and then with "Deployment failed, try again later". Retry only the deployment after 5 s, 20 s and 60 s, since re-running the job uploads a second artifact and makes the lookup fail with two. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 40 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
Documentationworkflow has failed on 11 of the last 30 pushes tomain(for examplerun 45717608248). The build and the artifact upload succeed
every time; only the
actions/deploy-pagesstep fails, in one of two ways:No artifacts named "github-pages" were found for this workflow run(10 of the 11 failures).deploy-pageslooksthe artifact up once, about 0.3 s after
upload-pages-artifactfinalizes it, and the artifact service has not listedit yet (
Found 0 artifact(s)). This is an upstream race:actions/deploy-pages#451. Reports there measure the delay
before the artifact shows up at 0.5 s to about 46 s. The fix,
actions/deploy-pages#455, retries the lookup, but it is not
merged yet, and v5.0.1 is still the latest release.
Deployment failed, try again later.(run 45717608248). The artifact was found and the deployment created, butPages reported it failed. This is a transient failure on the Pages side
(actions/deploy-pages#418).
Re-running the failed job does not help: it uploads a second
github-pagesartifact, and the lookup then fails withMultiple artifacts named "github-pages". The failures are frequent now because Renovate auto-merges and pushes tomainmany times a day.This pull request retries only the deployment step, with
continue-on-error, after waiting 5 s, 20 s and 60 s, the sameworkaround renovatebot/renovate#48395 uses. The environment URL
takes the
page_urlof whichever attempt succeeded. A comment in the workflow says to remove the retries onceactions/deploy-pages#455 is released.
Test results
prek run --files .github/workflows/docs.yaml(yamllint and the other hooks) passes.zizmor --offline .github/workflows/docs.yamlreports no findings.Repository checkon this pull request.main, so the retries are first exercised after this is merged.Impact
.github/workflows/docs.yamlchanges. The site and its build do not change.up, which is still within the 10-minute job timeout.
Supplementary information
sleepbefore the deployment would also work around the race, but it delays every run, and the delaysreported in Intermittent "No artifacts named github-pages" when deploy-pages runs right after upload-pages-artifact in the same job actions/deploy-pages#451 vary from under a second to about 46 s.
🤖 Generated with Claude Code