Skip to content

Skip deploy preview action on forks - #29137

Merged
mvvmm merged 1 commit into
productionfrom
skip-previews-on-forks
Mar 19, 2026
Merged

mvvmm merged 1 commit into
productionfrom
skip-previews-on-forks

Conversation

@mvvmm

@mvvmm mvvmm commented Mar 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Recent changes (#28975) caused previews to try to run on forks, and then fail.

@mvvmm

mvvmm commented Mar 19, 2026

Copy link
Copy Markdown
Collaborator Author

/bonk will this stop the deploy preview job from failing on forks?

@github-actions

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/.github/ @cloudflare/content-engineering, @kodster28, @mvvmm, @colbywhite, @ahaywood

@ask-bonk

ask-bonk Bot commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Approved — This fix correctly prevents deploy previews from running on forks.

The change swaps github.repository for github.event.pull_request.head.repo.full_name == github.repository, which properly detects when a PR originates from a fork. In the old condition, the workflow still ran in the base repository even for forks, causing deployment failures due to missing secrets. The new condition correctly skips the publish-preview job when the PR comes from a forked repository.

github run

@mvvmm mvvmm changed the title Skip deploy preview on forks Skip deploy preview action on forks Mar 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@mvvmm
mvvmm merged commit abeef43 into production Mar 19, 2026
17 checks passed
@mvvmm
mvvmm deleted the skip-previews-on-forks branch March 19, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants