forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (39 loc) · 1.22 KB
/
ci-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
name: Docs
on:
push:
branches:
- main
paths:
- "**.rs"
- "Cargo.toml"
- "Cargo.lock"
workflow_dispatch:
jobs:
docs:
name: Generate crate documentation
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # pin@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
# Upgrade below after the workspace upgrades to Rust 1.72 or later.
# https://substrate.stackexchange.com/a/9069
toolchain: nightly-2023-06-15
override: true
- name: Generate documentation
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # pin@v1
env:
RUSTDOCFLAGS: "--enable-index-page -Zunstable-options"
with:
command: doc
args: --workspace --exclude "sui-benchmark" --no-deps
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # pin@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./target/doc
force_orphan: true