File tree Expand file tree Collapse file tree 1 file changed +20
-12
lines changed Expand file tree Collapse file tree 1 file changed +20
-12
lines changed Original file line number Diff line number Diff line change 6
6
- ' book/**'
7
7
workflow_dispatch :
8
8
9
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9
10
permissions :
10
- contents : write
11
- actions : read
11
+ contents : read
12
+ pages : write
13
+ id-token : write
14
+
15
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17
+ concurrency :
18
+ group : " pages"
19
+ cancel-in-progress : false
12
20
13
21
jobs :
14
22
deploy :
15
23
name : Deploy book
16
24
if : github.ref == 'refs/heads/master'
25
+ environment :
26
+ name : github-pages
27
+ url : ${{ steps.deployment.outputs.page_url }}
17
28
runs-on : ubuntu-latest
18
- concurrency :
19
- group : ${{ github.workflow }}-${{ github.ref }}
20
29
steps :
21
30
- name : Checkout
22
31
uses : actions/checkout@v3
@@ -27,12 +36,11 @@ jobs:
27
36
- name : Build
28
37
run : cd book && make build
29
38
30
- - name : Setup Pages
31
- uses : actions/configure-pages@v4
32
-
33
- - name : Deploy
34
- uses : peaceiris/actions-gh-pages@v3
35
- if : ${{ github.ref == 'refs/heads/master' }}
39
+ - name : Upload artifact
40
+ uses : actions/upload-pages-artifact@v2
36
41
with :
37
- github_token : ${{ secrets.GITHUB_TOKEN }}
38
- publish_dir : ./book/book
42
+ path : ' ./book/book'
43
+
44
+ - name : Deploy to GitHub Pages
45
+ id : deployment
46
+ uses : actions/deploy-pages@v3
You can’t perform that action at this time.
0 commit comments