-
Notifications
You must be signed in to change notification settings - Fork 296
51 lines (42 loc) · 1.71 KB
/
docs-lint.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
name: Docs lint
on: pull_request
jobs:
rustdocs:
# We use a custom script to generate the index page for https://rustdoc.penumbra.zone,
# and refactors to rust deps can break that generation. Let's ensure this script exits 0
# on PRs, but we'll still only deploy after merge into main.
name: rustdoc-lint
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Install nightly rust toolchain
# The script for rustdoc build requires nightly toolchain.
run: rustup toolchain install nightly
# Loading cache takes ~15s, but saves us minutes of build.
- name: Load rust cache
uses: astriaorg/[email protected]
# Building with warm cache takes ~40s, depending on changes.
- name: Build rustdocs
run: ./deployments/scripts/rust-docs
# Also validate that the `mdbook` docs (guide & protocol) build correctly.
# In particular, links are checked within the docs.
mdbook:
name: mdbook-lint
# Downgrading runner size to 4vcpu, since we're not compiling code.
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
with:
lfs: false
- name: Load rust cache
uses: astriaorg/[email protected]
# It's OK to install from crates, building from source, because of cache use
# on previous step. Install takes ~5s with warm cache.
- name: Install mdbook dependencies
run: cargo install mdbook mdbook-katex mdbook-mermaid mdbook-linkcheck
- name: Build guide docs
run: cd docs/guide && mdbook build
- name: Build protocol docs
run: cd docs/protocol && mdbook build