ci: retry the gh-pages publish with backoff on transient failures#81
Merged
Conversation
GitHub's auto "pages build and deployment" occasionally fails with "Deployment failed, try again later." when concurrent gh-pages pushes race, leaving the site stuck on the previous build. Add a composite action that, after each zensical deploy, waits for that deployment and reruns it up to three times until it succeeds. Wire it into the main, develop and preview workflows and grant them actions: write so they can rerun the run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgcYQy7Mnh2afkmSg295uU
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #81 +/- ##
========================================
Coverage 98.15% 98.15%
========================================
Files 17 17
Lines 1948 1948
========================================
Hits 1912 1912
Misses 36 36 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Under concurrent multi-repo Pages deploys, GitHub throttles at the account level and reruns fired seconds apart still fail. Wait a growing delay (30/60/90/120s) before each rerun and allow up to 5 attempts, so the retry absorbs the throttling window instead of exhausting itself immediately. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgcYQy7Mnh2afkmSg295uU
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.
GitHub's auto "pages build and deployment" (Pages is in deploy-from-branch mode) occasionally fails with
Deployment failed, try again later.when concurrentgh-pagespushes race, leaving the docs site stuck on an older build. That job is auto-generated by GitHub and not editable, so the retry lives on our side.What this does
.github/actions/ensure-pages-published: after a deploy, it finds thepages-build-deploymentrun for the currentgh-pagesHEAD, waits for it to complete, and reruns it up to 3 times until it succeeds.zensical,zensical-develop,zensical-preview), after theJamesIvespush step.actions: writeso the token cangh run rerun.Ported verbatim from Toilal/fastapi-router-lazy#14 (identical workflow stack).
🤖 Generated with Claude Code