File tree Expand file tree Collapse file tree 1 file changed +28
-9
lines changed Expand file tree Collapse file tree 1 file changed +28
-9
lines changed Original file line number Diff line number Diff line change
1
+ # From https://github.blog/changelog/2022-07-27-github-pages-custom-github-actions-workflows-beta/
1
2
name : Demo
2
3
3
4
on :
4
5
- pull_request
5
6
- push
6
7
8
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9
+ permissions :
10
+ contents : read
11
+ pages : write
12
+ id-token : write
13
+
14
+ # Allow one concurrent deployment
15
+ concurrency :
16
+ group : " pages"
17
+ cancel-in-progress : true
18
+
7
19
jobs :
8
- deploy :
20
+ build :
9
21
runs-on : ubuntu-latest
10
22
steps :
11
23
- uses : actions/checkout@v3
12
- - run : npm install
24
+ - run : npm ci
13
25
- run : npm run demo:build
14
26
- run : npm run demo:test
15
- - uses : peaceiris/actions-gh-pages@v3
16
- if : github.ref == 'refs/heads/main'
17
- with :
18
- github_token : ${{ secrets.GITHUB_TOKEN }}
19
- publish_dir : ./demo/dist
20
- user_name : ' github-actions[bot]'
21
- user_email : ' github-actions[bot]@users.noreply.github.com'
27
+ - name : Upload artifact
28
+ uses : actions/upload-pages-artifact@v1
29
+
30
+ deploy :
31
+ environment :
32
+ name : github-pages
33
+ url : ${{ steps.deployment.outputs.page_url }}
34
+ runs-on : ubuntu-latest
35
+ needs : build
36
+ if : github.ref == 'refs/heads/main'
37
+ steps :
38
+ - name : Deploy to GitHub Pages
39
+ id : deployment
40
+ uses : actions/deploy-pages@v1
You can’t perform that action at this time.
0 commit comments