Skip to content

Commit 4ea1e2a

Browse files
authored
ci: skip deploy-preview job for fork PRs (#13584)
Fork PRs don't have access to the Netlify and bot token secrets, so the deploy step always failed and surfaced as a failing check on the PR. Gate the job on the head repo matching the base repo so it's skipped (not failed) for forks. Skipped checks don't block merge.
1 parent 90792c3 commit 4ea1e2a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/deploy-preview.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ permissions:
3333

3434
jobs:
3535
deploy-preview:
36+
# Skip for PRs from forks — they don't have access to the Netlify secrets,
37+
# so the deploy step would always fail. A skipped check does not block merge.
38+
if: github.event.pull_request.head.repo.full_name == github.repository
3639
runs-on: ubuntu-latest
37-
40+
3841
steps:
3942
- name: Checkout
4043
uses: actions/checkout@v4

0 commit comments

Comments
 (0)