File tree 1 file changed +21
-9
lines changed
1 file changed +21
-9
lines changed Original file line number Diff line number Diff line change 1
1
name : Build Demo
2
- on : [push]
2
+ on :
3
+ push :
4
+ branches : [ "main" ]
3
5
permissions :
4
6
contents : read
5
7
6
8
jobs :
7
- deploy :
8
- permissions :
9
- contents : write # for peaceiris/actions-gh-pages to push pages branch
9
+ build :
10
10
runs-on : ubuntu-latest
11
11
steps :
12
12
- name : Harden Runner
24
24
working-directory : ./demo
25
25
- run : npm run build
26
26
working-directory : ./demo
27
- - name : Publish Demo
28
- uses : peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e
29
- if : ${{ github.ref == 'refs/heads/main' }}
27
+ - name : Upload static files as artifact
28
+ id : deployment
29
+ uses : actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
30
30
with :
31
- github_token : ${{ secrets.GITHUB_TOKEN }}
32
- publish_dir : ./demo/static
31
+ path : ./demo/static/
32
+ deploy :
33
+ needs : build
34
+ permissions :
35
+ pages : write
36
+ id-token : write
37
+ environment :
38
+ name : github-pages
39
+ url : ${{ steps.deployment.outputs.page_url }}
40
+ runs-on : ubuntu-latest
41
+ steps :
42
+ - name : Deploy to GitHub Pages
43
+ id : deployment
44
+ uses : actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
You can’t perform that action at this time.
0 commit comments