-
Notifications
You must be signed in to change notification settings - Fork 8
54 lines (46 loc) · 1.54 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
47
48
49
50
51
52
53
54
name: Publish Rust Docs
on:
push:
tags:
- v*
jobs:
deploy-docs:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-12-04
override: true
components: rustfmt, clippy
target: wasm32-unknown-unknown
# With rustup's nice new toml format, we just need to run rustup show to install the toolchain
# https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659
- name: Setup Rust toolchain
run: rustup show
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-doc-${{ hashFiles('**/Cargo.lock') }}
- name: Build rustdocs
uses: actions-rs/cargo@v1
env:
CARGO_INCREMENTAL: "0"
with:
command: doc
args: --all --no-deps
# Make an index.html file so we start at the moonbeam_runtime page
# Copied from https://github.com/substrate-developer-hub/rustdocs/blob/master/index.html
- name: Make index.html
run: echo "<meta http-equiv=refresh content=0;url=fs_node_runtime/index.html>" > ./target/doc/index.html
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./target/doc