Skip to content

ci: retry the gh-pages publish with backoff on transient failures#81

Merged
Toilal merged 2 commits into
developfrom
docs/pages-publish-retry
Jul 5, 2026
Merged

ci: retry the gh-pages publish with backoff on transient failures#81
Toilal merged 2 commits into
developfrom
docs/pages-publish-retry

Conversation

@Toilal

@Toilal Toilal commented Jul 5, 2026

Copy link
Copy Markdown
Owner

GitHub's auto "pages build and deployment" (Pages is in deploy-from-branch mode) occasionally fails with Deployment failed, try again later. when concurrent gh-pages pushes 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

  • New composite action .github/actions/ensure-pages-published: after a deploy, it finds the pages-build-deployment run for the current gh-pages HEAD, waits for it to complete, and reruns it up to 3 times until it succeeds.
  • Wired into the three zensical workflows (zensical, zensical-develop, zensical-preview), after the JamesIves push step.
  • Granted actions: write so the token can gh run rerun.

Ported verbatim from Toilal/fastapi-router-lazy#14 (identical workflow stack).

🤖 Generated with Claude Code

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

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.15%. Comparing base (e27ff85) to head (3d3d584).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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
@Toilal Toilal changed the title ci: retry the gh-pages publish up to 3× on transient failures ci: retry the gh-pages publish with backoff on transient failures Jul 5, 2026
@Toilal Toilal merged commit e74fadb into develop Jul 5, 2026
28 checks passed
@Toilal Toilal deleted the docs/pages-publish-retry branch July 5, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant