File tree 1 file changed +50
-0
lines changed 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Github Pages
2
+
3
+ on : [push, pull_request]
4
+
5
+ concurrency :
6
+ group : " pages"
7
+ cancel-in-progress : false
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Setup Pages
14
+ id : pages
15
+ uses : actions/configure-pages@v5
16
+
17
+ - name : Setup mdBook
18
+ uses : jontze/action-mdbook@v3
19
+ with :
20
+ token : ${{secrets.GITHUB_TOKEN}}
21
+ use-mermaid : true
22
+
23
+ - name : Setup Toml Cli
24
+ run : cargo install toml-cli
25
+
26
+ - name : Checkout
27
+ uses : actions/checkout@v4
28
+
29
+ - name : Configure Site URL
30
+ run : toml set book.toml output.html.site-url "${{ steps.pages.outputs.base_path }}"
31
+
32
+ - name : Build
33
+ run : mdbook build
34
+
35
+ - name : Upload artifact
36
+ uses : actions/upload-pages-artifact@v3
37
+ with :
38
+ path : book/
39
+
40
+ deploy :
41
+ runs-on : ubuntu-latest
42
+ needs : build
43
+ if : github.ref == 'refs/heads/master'
44
+ environment :
45
+ name : github-pages
46
+ url : ${{ steps.deployment.outputs.page_url }}
47
+ steps :
48
+ - name : Deploy to GitHub Pages
49
+ id : deployment
50
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments