Prevent GitHub Pages deployment on forks#176
Open
oasis-parzival wants to merge 1 commit intogbdev:masterfrom
Open
Prevent GitHub Pages deployment on forks#176oasis-parzival wants to merge 1 commit intogbdev:masterfrom
oasis-parzival wants to merge 1 commit intogbdev:masterfrom
Conversation
avivace
approved these changes
Apr 4, 2026
avivace
reviewed
Apr 4, 2026
Member
avivace
left a comment
There was a problem hiding this comment.
I guess this is ok, but doesn't let the deployment on forks at all anymore, no?
Shouldn't we try to deploy on the pages of the fork?
Contributor
I think no deployment on the fork is the desired behavior. At least from my point of view, there’s no point in deploying a website when forking just for a PR. Unless we want to allow checking the website after deployment to see how it looks but you can always just run it locally to make sure it’s all good. |
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.
Closes #167
This PR adds a conditional check to the
build_and_deploy.yamlworkflow file to skip the deployment step when the workflow is triggered on a fork. This resolves the 404 errors seen on forked repositories by preventing the action from attempting to deploy to a non-existent GitHub Pages source. The check utilizes thegithub.event_nameandgithub.repositorycontext variables to determine if the workflow is running on a fork.