This repository was archived by the owner on Jul 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +30
-10
lines changed Expand file tree Collapse file tree 1 file changed +30
-10
lines changed Original file line number Diff line number Diff line change 6
6
push :
7
7
branches : main
8
8
paths : ['docs/**','.github/workflows/book.yml']
9
+ workflow_dispatch :
10
+
11
+ permissions :
12
+
13
+ contents : read
14
+ pages : write
15
+ id-token : write
16
+
17
+ concurrency :
18
+ group : " pages"
19
+ cancel-in-progress : false
9
20
jobs :
10
- deploy :
11
- name : Build and Deploy
21
+ build :
22
+ name : Build
12
23
runs-on : ubuntu-20.04
13
24
concurrency :
14
25
group : ${{ github.workflow }}-${{ github.ref }}
25
36
~/.cargo/git/db/
26
37
target/
27
38
key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
39
+ - name : 🔨 Setup Pages
40
+ id : pages
41
+ uses : actions/configure-pages@v5
28
42
- name : 🔨 Install mdbook
29
43
uses : peaceiris/actions-mdbook@v1
30
44
with :
@@ -37,12 +51,18 @@ jobs:
37
51
- name : 🔨 Build Book
38
52
run : mdbook build
39
53
# working-directory: ./docs
40
- - name : 🌍 Deploy
41
- uses : peaceiris/actions-gh-pages@v3
42
- if : ${{ github.ref == 'refs/heads/main' }}
54
+ - name : Upload artifact
55
+ uses : actions/upload-pages-artifact@v3
43
56
with :
44
- github_token : ${{ secrets.GITHUB_TOKEN }}
45
- publish_branch : pages
46
- publish_dir : ./book
47
- # publish_dir: ./docs/book
48
- destination_dir : docs
57
+ path : ./book
58
+ deploy :
59
+ name : Deploy
60
+ environment :
61
+ name : github-pages
62
+ url : ${{ steps.deployment.outputs.page_url }}
63
+ runs-on : ubuntu-latest
64
+ needs : build
65
+ steps :
66
+ - name : Deploy to GitHub Pages
67
+ id : deployment
68
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments