-
-
Notifications
You must be signed in to change notification settings - Fork 79
40 lines (38 loc) · 953 Bytes
/
docs.yml
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
name: Deploy Documentation
on:
workflow_dispatch:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Rust
uses: ATiltedTree/setup-rust@v1
with:
rust-version: stable
- name: Cache Dependencies
uses: actions/cache@v3
with:
path: ~/.cargo
key: cargo-cache-${{ hashFiles('Cargo.lock') }}
- name: Install dependencies
run: |
cargo install mdbook mdbook-mermaid mdbook-toc
- name: Build MDBook
run: |
if [ -d "docs" ]; then
cd docs
mdbook build
else
echo "Docs folder not found."
fi
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/book
single-commit: true