ci: split docs-deploy from docs-build to avoid false Pages failures on PRs#527
Merged
Conversation
…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>
This reverts commit 7d6bdc7.
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.
Summary
docsjob's job-levelenvironment: github-pagestriggers a deployment attempt as soon as the job starts, independent of the step-levelif: github.ref == 'refs/heads/main'guard on the actualDeploy to GitHub Pagesstepgithub-pagesenvironment'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 runsdocs-build(every push/PR, no environment) anddocs-deploy(main-only, carries the environment) — PR runs now never touch thegithub-pagesenvironmentTest plan
python -c "import yaml; yaml.safe_load(...)"docs-buildsucceeding with no github-pages deployment attempt/failure🤖 Generated with Claude Code