-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.34 KB
/
rustdoc.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
---
name: Documentation
"on":
push:
branches:
- trunk
pull_request:
branches:
- trunk
schedule:
- cron: "0 0 * * TUE"
concurrency:
group: docs-${{ github.head_ref }}
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
rustdoc:
name: Build Rust API docs
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -D warnings -D rustdoc::broken_intra_doc_links --cfg docsrs
RUST_BACKTRACE: 1
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Install Rust toolchain
uses: artichoke/setup-rust/[email protected]
- name: Check docs with no default features
run: cargo doc --workspace --no-default-features
- name: Clean docs
run: cargo clean
- name: Build Documentation
run: cargo doc --workspace
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v3.9.2
if: github.ref == 'refs/heads/trunk'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
publish_branch: gh-pages
user_name: artichoke-ci
user_email: [email protected]
# only have the most recent docs in the `gh-pages` branch
# https://github.com/artichoke/artichoke/issues/1826
force_orphan: true