Skip to content

Commit 1dafb4c

Browse files
committed
Add support for link checking and run it on CI
1 parent cad014b commit 1dafb4c

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- name: Install mdbook
1818
run: curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz
19-
- name: Check blacksmith format
20-
run: cargo fmt --check --manifest-path=blacksmith/Cargo.toml
2119
- name: Build book
2220
run: ./mdbook build
2321
- name: Upload artifact

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
test:
7+
name: CI
8+
runs-on: ubuntu-latest
9+
env:
10+
MDBOOK_VERSION: 0.4.51
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Install mdbook
14+
run: curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz
15+
- name: Install mdbook-linkcheck
16+
run: cargo install mdbook-linkcheck@0.7.7 --locked
17+
- name: Check blacksmith format
18+
run: cargo fmt --check --manifest-path=blacksmith/Cargo.toml
19+
- name: Build book
20+
run: ./mdbook build

book.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@ smart-punctuation = true
6161
"platforms/zulip/triagebot.html" = "/triagebot/index.html"
6262
"core/blogs.html" = "/platforms/blogs.html"
6363
"core/index.html" = "/governance/council.html"
64+
65+
[output.linkcheck]
66+
follow-web-links = false
67+
optional = true

0 commit comments

Comments
 (0)