ci: skip Pages deploy on forks - #2
Merged
Merged
Conversation
The docs workflow was failing with HTTP 404 from actions/deploy-pages@v4 on every push to main on this fork because GitHub Pages isn't enabled on wuad391/raiden (and shouldn't be — only the canonical tri-ml/raiden publishes docs to wuad391.github.io would just be noise). Gate both the Pages upload step and the deploy job on `github.repository == 'tri-ml/raiden'`. Forks still validate the mkdocs build (the meaningful CI check); the upload + deploy pair is skipped together so the deploy job's `needs: build` dependency stays consistent. Also bumps actions/checkout v4 -> v5 (Node 20 deprecation, same fix already applied to lint.yml in 06a3bbe).
There was a problem hiding this comment.
Pull request overview
Updates the GitHub Pages docs workflow to avoid failing on forks where Pages isn’t enabled, while still validating that the docs build succeeds.
Changes:
- Gate the Pages artifact upload step to only run on
tri-ml/raiden. - Gate the Pages deploy job to only run on
tri-ml/raiden. - Bump
actions/checkoutto@v5in the docs workflow.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+44
to
+47
| # GitHub Pages is only enabled on the canonical upstream repo. | ||
| # Skipping on forks (e.g. wuad391/raiden) avoids a 404 from | ||
| # actions/deploy-pages on every push to main. | ||
| if: github.repository == 'tri-ml/raiden' |
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.
docs workflow was failing with HTTP 404 from actions/deploy-pages@v4 on every push to main on this fork because GitHub Pages isn't enabled on wuad391/raiden.