File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy PR Preview to Pages
2+ on :
3+ pull_request :
4+ branches : ["main"]
5+ workflow_dispatch :
6+
7+ permissions :
8+ contents : read
9+ pages : write
10+ id-token : write
11+
12+ concurrency :
13+ group : " pages-pr-${{ github.event.pull_request.number || 'manual' }}"
14+ cancel-in-progress : false
15+
16+ jobs :
17+ deploy :
18+ environment :
19+ name : github-pages
20+ url : ${{ steps.deployment.outputs.page_url }}
21+ runs-on : ubuntu-latest
22+ steps :
23+ - name : Checkout PR
24+ uses : actions/checkout@v4
25+ with :
26+ ref : ${{ github.head_ref }}
27+
28+ - name : Setup Pages
29+ uses : actions/configure-pages@v5
30+
31+ - name : Upload artifact
32+ uses : actions/upload-pages-artifact@v3
33+ with :
34+ path : ' .'
35+
36+ - name : Deploy to GitHub Pages
37+ id : deployment
38+ uses : actions/deploy-pages@v4
39+ with :
40+ branch : pr-${{ github.event.pull_request.number || 'preview' }}
You can’t perform that action at this time.
0 commit comments