File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 18
18
uses : peaceiris/actions-gh-pages@v3
19
19
with :
20
20
publish_dir : ./build
21
+ keep_files : true
21
22
github_token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : Publish PR to gh-pages/pr/
2
+ on :
3
+ pull_request :
4
+ branches : [ main ]
5
+ jobs :
6
+ build :
7
+ runs-on : ubuntu-latest
8
+ if : ${{ github.event.number }}
9
+ steps :
10
+ - uses : actions/checkout@v4
11
+ - uses : actions/setup-node@v4
12
+ - run : npm install
13
+ - run : npm run build
14
+ - name : Publish HTML to GitHub Pages
15
+ if : github.ref == 'refs/heads/main'
16
+ uses : peaceiris/actions-gh-pages@v3
17
+ with :
18
+ publish_dir : ./build
19
+ destination_dir : pr/${{ github.event.number }}/
20
+ keep_files : true
21
+ github_token : ${{ secrets.GITHUB_TOKEN }}
22
+ - id : get-preview-url
23
+ name : Get preview url
24
+ run : echo "::set-output name=preview-url::https://tc39.es/$(basename $GITHUB_REPOSITORY)/pr/${{ github.event.number }}"
25
+ shell : bash
26
+ - name : Post Preview Comment
27
+ uses :
phulsechinmay/[email protected]
28
+ with :
29
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
30
+ COMMENT_IDENTIFIER : tc39_pr_preview_comment
31
+ message : |
32
+ A preview of this PR can be found at ${{ steps.get-preview-url.outputs.preview-url }}.
Original file line number Diff line number Diff line change
1
+ build
2
+ node_modules
You can’t perform that action at this time.
0 commit comments