Fail if GitHub Pages is not correctly configured#37
Merged
Conversation
Previously, the actions/deploy-pages@v4 step would fail with a hard-to-understand error message if the repo is not configured to have GitHub Pages published from Actions. Add a check at the start of the composite action, and fail the whole job if the repo is misconfigured, having emitted a summary explaining the problem. Since Actions workflows are disabled on forks by default, it seems OK to make this a hard failure: if someone has gone to the trouble of enabling Actions on their fork of a project using this action, then they presumably would like to be told why it isn't working.
Member
Author
|
Example error: https://github.com/wjt/github-pages-branches-test/actions/runs/16000736478 The message comes from the previous single-branch build workflow in e.g. Moddable Platformer: |
manuq
approved these changes
Jul 1, 2025
Contributor
manuq
left a comment
There was a problem hiding this comment.
Awesome, the error is right there in the summary, no need to check for the workflow output.
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.
Previously, the actions/deploy-pages@v4 step would fail with a hard-to-understand error message if the repo is not configured to have GitHub Pages published from Actions.
Add a check at the start of the composite action, and fail the whole job if the repo is misconfigured, having emitted a summary explaining the problem. Since Actions workflows are disabled on forks by default, it seems OK to make this a hard failure: if someone has gone to the trouble of enabling Actions on their fork of a project using this action, then they presumably would like to be told why it isn't working.