-
Notifications
You must be signed in to change notification settings - Fork 59
46 lines (38 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
46
name: GitHub pages
on: [push, pull_request]
jobs:
guide:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
- run: mdbook build guide
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
components: rustfmt, rust-src
- name: Build Documentation
run: cargo doc --lib --features full --no-deps
env:
RUSTDOCFLAGS: --cfg docsrs
- name: Deploy
if: github.ref == 'refs/heads/main'
uses: peaceiris/[email protected]
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./guide/book
keep_files: false
- name: Deploy
if: github.ref == 'refs/heads/main'
uses: peaceiris/[email protected]
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
destination_dir: ./docs
keep_files: true