-
-
Notifications
You must be signed in to change notification settings - Fork 99
45 lines (43 loc) · 1.13 KB
/
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
41
42
43
44
45
on:
push:
branches:
- master
- main
name: Docs
jobs:
docs:
name: Build and deploy documentation
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install static-sitemap-cli
run: npm install static-sitemap-cli
- name: Build rustdoc
run: cargo doc --all-features --workspace
- name: Install mdbook
uses: baptiste0928/cargo-install@v1
with:
crate: mdbook
version: 0.4
- name: Run mdbook
run: |
cd site
mdbook build
- name: Generate sitemap
run: |
cd site/output
npx sscli --base https://nexte.st
- name: Organize
run: |
rm -rf target/gh-pages
mv site/output target/gh-pages
mv target/doc target/gh-pages/rustdoc
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
branch: gh-pages
folder: target/gh-pages
single-commit: true