File tree 1 file changed +63
-0
lines changed
1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Sample workflow for building and deploying a mdBook site to GitHub Pages
2
+ #
3
+ # To get started with mdBook see: https://rust-lang.github.io/mdBook/index.html
4
+ #
5
+ name : Deploy mdBook site to Pages
6
+
7
+ on :
8
+ # Runs on only core version tags
9
+ push :
10
+ tags :
11
+ - ' v*'
12
+
13
+ # Allows you to run this workflow manually from the Actions tab
14
+ workflow_dispatch :
15
+
16
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
17
+ permissions :
18
+ contents : read
19
+ pages : write
20
+ id-token : write
21
+
22
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
23
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
24
+ concurrency :
25
+ group : " pages"
26
+ cancel-in-progress : false
27
+
28
+ jobs :
29
+ # Build job
30
+ build :
31
+ runs-on : ubuntu-latest
32
+ env :
33
+ MDBOOK_VERSION : 0.4.44
34
+ steps :
35
+ - uses : actions/checkout@v4
36
+ - name : Install mdBook
37
+ run : |
38
+ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
39
+ rustup update
40
+ cargo install --version ${MDBOOK_VERSION} mdbook
41
+ - name : Setup Pages
42
+ id : pages
43
+ uses : actions/configure-pages@v5
44
+ - name : Build with mdBook
45
+ run : |
46
+ cd docs
47
+ mdbook build
48
+ - name : Upload artifact
49
+ uses : actions/upload-pages-artifact@v3
50
+ with :
51
+ path : ./docs/book
52
+
53
+ # Deployment job
54
+ deploy :
55
+ environment :
56
+ name : github-pages
57
+ url : ${{ steps.deployment.outputs.page_url }}
58
+ runs-on : ubuntu-latest
59
+ needs : build
60
+ steps :
61
+ - name : Deploy to GitHub Pages
62
+ id : deployment
63
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments