Skip to content

ci: split docs-deploy from docs-build to avoid false Pages failures on PRs#527

Merged
petercorke merged 5 commits into
mainfrom
ci/split-docs-deploy-job
Jul 3, 2026
Merged

ci: split docs-deploy from docs-build to avoid false Pages failures on PRs#527
petercorke merged 5 commits into
mainfrom
ci/split-docs-deploy-job

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Summary

  • The docs job's job-level environment: github-pages triggers a deployment attempt as soon as the job starts, independent of the step-level if: github.ref == 'refs/heads/main' guard on the actual Deploy to GitHub Pages step
  • The github-pages environment's deployment protection rules restrict it to the default branch, so every PR (including dependabot's routine action-version bumps, e.g. build(deps): bump actions/upload-pages-artifact from 3 to 5 #521-525) shows a spurious "had a problem deploying to github-pages" failure even though the deploy step never runs
  • Split into docs-build (every push/PR, no environment) and docs-deploy (main-only, carries the environment) — PR runs now never touch the github-pages environment

Test plan

  • YAML validated with python -c "import yaml; yaml.safe_load(...)"
  • This PR's own CI run should show docs-build succeeding with no github-pages deployment attempt/failure

🤖 Generated with Claude Code

petercorke and others added 5 commits July 3, 2026 07:37
…n PRs

A job-level `environment: github-pages` triggers a deployment attempt
against that environment as soon as the job starts, regardless of the
step-level `if: github.ref == 'refs/heads/main'` guard on the actual
deploy step. The github-pages environment's deployment protection
rules restrict it to the default branch, so every PR (dependabot's
weekly action bumps included) was showing a spurious
"had a problem deploying to github-pages" failure even though the
deploy step itself never ran.

Split into docs-build (runs on every push/PR, no environment) and
docs-deploy (main-only, carries the environment) so PR runs never
touch the github-pages environment at all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
TEMPORARY, for CI validation only — revert before merging. See
refactor/c-extensions@6dcfc624 for the same change and rationale.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@petercorke petercorke merged commit ecdf165 into main Jul 3, 2026
1 of 13 checks passed
@petercorke petercorke deleted the ci/split-docs-deploy-job branch July 3, 2026 00:23
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