-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (50 loc) · 1.43 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Build Docs
on:
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
# This is the one we use for producing documentation
build_docs:
runs-on: ubuntu-latest
permissions:
contents: "read"
pages: write
id-token: "write"
steps:
- uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install MdBook
run: cargo install mdbook
- name: Install MDBook Katex
run: cargo install mdbook-katex
- name: Compile Book
run: |
mkdir tmp
cp -R auto_src/. tmp/.
cat src/SUMMARY_TEMPLATE.md > tmp_summary.md
cat tmp/docs/ioreference/src/SUMMARY.md >> tmp_summary.md
cp -R src/. tmp/docs/ioreference/src/.
cat tmp_summary.md > tmp/docs/ioreference/src/SUMMARY.md
- name: Build mdbook
run: |
cd tmp/docs/ioreference
mdbook build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload Docs
path: "tmp/docs"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4