Skip to content

Commit edf50ff

Browse files
committed
Simple wins
1 parent 11487c5 commit edf50ff

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

.github/workflows/build_and_deploy.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,12 @@ env:
2828
jobs:
2929
deploy-target:
3030
runs-on: ubuntu-latest
31-
# TL;DR: Only trigger for push events or pull_request events from forks.
32-
#
33-
# PRs from forks will only trigger a pull_request event where sha and workflow_sha are different.
34-
# PRs from vercel/next.js will trigger push and pull_request event. Both events
35-
# events from vercel/next.js, will have the sha and workflow_sha.
36-
# We only need one run so skip the pull_request event.
37-
# The pull_request event would not give us a sha that we can use to query this
38-
# workflow which is required for vercel-packages to work.
31+
# Don't trigger this job on `pull_request` events from upstream branches.
32+
# Those would already run this job on the `push` event
33+
if: ${{ github.event_name != 'pull_request' || github.event.repository.fork }}
3934
outputs:
4035
value: ${{ steps.deploy-target.outputs.value }}
4136
steps:
42-
- run: |
43-
echo "event_name=${{ github.event_name }}"
44-
echo "sha=${{ github.sha }}"
45-
echo "workflow_sha=${{ github.workflow_sha }}"
4637
- uses: actions/checkout@v4
4738
with:
4839
fetch-depth: 1

0 commit comments

Comments
 (0)