-
Notifications
You must be signed in to change notification settings - Fork 7
59 lines (55 loc) · 1.78 KB
/
ci.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
55
56
57
58
59
name: ci
on:
push:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
spellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Rust (rustup)
run: rustup update stable --no-self-update && rustup default stable
- name: Install mdbook
run: cargo install mdbook
- name: Install aspell
run: sudo apt-get install aspell
- name: Install shellcheck
run: sudo apt-get install shellcheck
- name: Report versions
run: |
rustup --version
rustc -Vv
mdbook --version
aspell --version
shellcheck --version
- name: Shellcheck
run: find . -name '*.sh' | xargs shellcheck
- name: Spellcheck
run: bash ci/spellcheck.sh list
- name: Check for broken links
run: |
rustup toolchain install nightly --component rust-docs
curl -sSLo linkcheck.sh \
https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
# Cannot use --all here because of the generated redirect pages aren't available.
sh linkcheck.sh book
pages:
name: GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust (rustup)
run: rustup update stable --no-self-update && rustup default stable
- name: Install mdbook + pre-processors
run: |
cargo install mdbook
cargo install mdbook-mermaid
- name: Build book
run: mdbook build
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: book # The branch the action should deploy to.
folder: book # The folder the action should deploy.