Skip to content

Commit 39a0c3e

Browse files
Tries pull_request_target
1 parent da88433 commit 39a0c3e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/pr-preview.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
name: PR Preview
2+
23
on:
3-
pull_request: {}
4+
pull_request_target:
5+
types: [opened, synchronize, reopened]
46

57
jobs:
68
dispatch:
79
runs-on: ubuntu-latest
810
permissions:
11+
contents: read
912
pull-requests: write
1013
env:
1114
branch_name: ${{ github.event.pull_request.head.ref }}
1215
GH_TOKEN: ${{ github.token }}
1316
steps:
1417
- uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.event.pull_request.head.ref }}
20+
repository: ${{ github.event.pull_request.head.repo.full_name }}
1521
- uses: actions/setup-node@v4
1622
with:
1723
node-version: '16'

0 commit comments

Comments
 (0)