File tree Expand file tree Collapse file tree 2 files changed +19
-54
lines changed Expand file tree Collapse file tree 2 files changed +19
-54
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- main
7
+ pull_request_target :
7
8
workflow_dispatch :
8
9
workflow_call :
9
10
@@ -12,10 +13,21 @@ jobs:
12
13
permissions :
13
14
contents : read
14
15
runs-on : ubuntu-latest
16
+
15
17
steps :
16
- # Check out the content (source branch)
17
- - name : Check out source
18
+ - name : Checkout PR
19
+ if : ${{ github.event_name == 'pull_request_target' }}
20
+ uses : actions/checkout@v3
21
+ with :
22
+ ref : ${{ github.event.pull_request.head.ref }}
23
+ repository : ${{ github.event.pull_request.head.repo.full_name }}
24
+
25
+ - name : Checkout
26
+ if : ${{ github.event_name != 'pull_request_target' }}
18
27
uses : actions/checkout@v3
28
+ with :
29
+ ref : main
30
+
19
31
- name : Setup Pages
20
32
uses : actions/configure-pages@v1
21
33
- name : Use Node.js
46
58
runs-on : ubuntu-latest
47
59
needs : build-and-upload
48
60
steps :
49
- - name : Deploy to GitHub Pages
50
- id : deployment
51
- uses : actions/deploy-pages@v1
61
+ - name : Deploy to GitHub Pages
62
+ id : deployment
63
+ uses : paper-spa/deploy-pages@main
64
+ with :
65
+ preview : ${{ github.event_name == 'pull_request_target' }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments