Skip to content

Commit 131b6dc

Browse files
Fix Fork PR:
Signed-off-by: Rajesh-Nagarajan-11 <rajeshnagarajan36@gmail.com>
1 parent c4301b0 commit 131b6dc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/build-and-preview-site.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Build and Preview Site
22
on:
3-
pull_request:
3+
pull_request_target:
44
branches: [master]
55
types: [opened, synchronize, reopened, closed]
66

@@ -46,7 +46,7 @@ jobs:
4646
preview:
4747
needs: build
4848
runs-on: ubuntu-latest
49-
if: github.event_name == 'pull_request'
49+
if: github.event_name == 'pull_request_target'
5050
permissions:
5151
contents: write
5252
pull-requests: write
@@ -55,14 +55,14 @@ jobs:
5555
uses: actions/checkout@v6
5656

5757
- name: Download pre-built site
58-
if: github.event_name == 'pull_request'
58+
if: github.event_name == 'pull_request_target'
5959
uses: actions/download-artifact@v4
6060
with:
6161
name: public-dir
6262
path: .
6363

6464
- name: Extract site
65-
if: github.event_name == 'pull_request'
65+
if: github.event_name == 'pull_request_target'
6666
run: |
6767
unzip -q public-dir.zip
6868
# Ensure the extracted folder has the static files in a 'public' dir for the action
@@ -73,14 +73,14 @@ jobs:
7373
fi
7474
7575
- name: Deploy Preview
76-
if: github.event_name == 'pull_request' && github.event.action != 'closed'
76+
if: github.event_name == 'pull_request_target' && github.event.action != 'closed'
7777
uses: rossjrw/pr-preview-action@v1.6.3
7878
with:
7979
source-dir: public
8080
token: ${{ secrets.GITHUB_TOKEN }}
8181

8282
- name: Remove Preview on Close
83-
if: github.event_name == 'pull_request' && github.event.action == 'closed'
83+
if: github.event_name == 'pull_request_target' && github.event.action == 'closed'
8484
uses: rossjrw/pr-preview-action@v1.6.3
8585
with:
8686
source-dir: public

0 commit comments

Comments
 (0)