Skip to content

Commit 3f6299a

Browse files
Merge pull request #34 from AnilChinchawale/fix/pr-preview-permissions
fix: PR preview permissions
2 parents 46647d8 + afa9dbe commit 3f6299a

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/pr-preview.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: PR Preview Deploy
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types: [opened, synchronize, reopened, closed]
66

77
concurrency:
8-
group: preview-${{ github.ref }}
8+
group: preview-${{ github.event.pull_request.number }}
99
cancel-in-progress: true
1010

1111
jobs:
@@ -15,8 +15,10 @@ jobs:
1515
contents: write
1616
pull-requests: write
1717
steps:
18-
- name: Checkout repository
18+
- name: Checkout PR head
1919
uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.event.pull_request.head.sha }}
2022

2123
- name: Set up Python
2224
uses: actions/setup-python@v5
@@ -39,3 +41,4 @@ jobs:
3941
preview-branch: gh-pages
4042
umbrella-dir: pr-preview
4143
action: auto
44+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)