Skip to content

feat(gh-pages): Wait for the Pages build and retry when it fails - #961

Merged
BYK merged 1 commit into
masterfrom
byk/feat/gh-pages-wait-for-build
Nov 5, 2026
Merged

BYK merged 1 commit into
masterfrom
byk/feat/gh-pages-wait-for-build

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Closes #960.

The gh-pages target only pushed to the branch and reported success. GitHub builds and deploys Pages afterwards, so when that failed (sentry-python 2.74.0: actions/deploy-pages timed out at updating_pages), the publish went green while the docs stayed stale.

After the push, the target now waits for GitHub Pages to build the pushed commit, polling GET /repos/{o}/{r}/pages/builds/latest every 10s for up to 15 min. If the build errors or times out, it calls POST /repos/{o}/{r}/pages/builds and waits again, at most 2 times, and then fails the target with the build error and a link to the github-pages deployments. Because completed targets stay checked on the publish issue, re-adding accepted retries only gh-pages.

The wait is skipped, with a log line, in these cases:

  • GET /repos/{o}/{r}/pages returns 403/404 (Pages is off, or the token has no Pages permission). This logs a warning, and the target still succeeds.
  • Pages is not a legacy build from the configured branch, for example when it builds from a custom Actions workflow.
  • Dry-run. The dry-run Octokit proxy doesn't treat request* methods as mutating, so this skip also keeps requestPagesBuild out of dry-run.

Unverified: I haven't checked whether the sentry-release-bot token used by getsentry/publish has Pages read/write. Without read, the 403/404 fallback above keeps releases working, but there's no wait. With read but no write, a failed build fails the target when the rebuild request is rejected. That failure is real, and it would surface on the publish issue.

Worst case, the target now holds the publish job for about 45 min (3 attempts × 15 min).

via @BYK.

--

View Session [Sentry]

A push to the Pages branch only starts the build, so a failed build went unnoticed (#960). Wait for the build of the pushed commit, request up to 2 rebuilds, then fail the target.

Co-Authored-By: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-11-05 18:30 UTC

@BYK
BYK merged commit 3696693 into master Nov 5, 2026
29 checks passed
@BYK
BYK deleted the byk/feat/gh-pages-wait-for-build branch November 5, 2026 18:30
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.

Failed to deploy to GH page

1 participant