Skip to content

Commit e758ad2

Browse files
committed
Update Github workflows to account for the mdBook upgrade
mdBook was still referring to 0.4.x versions in the github workflow, and mdbook-linkcheck has not been updated to support 0.5. This commit switches the repo to using "mdbook-linkcheck2", which is a fork that's been properly updated. mdbook-linkcheck2 does not have any releases associated with the repo, which meant I had to switch installation methods. As such, I moved towards a (hopefully) straightforward `cargo install` approach.
1 parent 70eaff3 commit e758ad2

2 files changed

Lines changed: 11 additions & 20 deletions

File tree

.github/workflows/build-and-deploy.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ concurrency:
2727
cancel-in-progress: false
2828

2929
env:
30-
MDBOOK_LINKCHECK_VER: 0.7.7
30+
MDBOOK_VERSION: 0.5.2
31+
MDBOOK_LINKCHECK2_VERSION: 0.12.0
3132

3233
jobs:
3334
build:
3435
name: Build Pan Docs
3536
runs-on: ubuntu-latest
3637
steps:
38+
- uses: dtolnay/rust-toolchain@stable
3739
- name: Checkout pandocs
3840
uses: actions/checkout@v4
3941
with:
@@ -45,9 +47,7 @@ jobs:
4547
workspaces: pandocs/
4648

4749
- name: Install mdbook
48-
uses: peaceiris/actions-mdbook@v2
49-
with:
50-
mdbook-version: 0.4.40
50+
run: cargo install mdbook@${MDBOOK_VERSION}
5151

5252
- name: Install static-sitemap-cli
5353
run: npm install static-sitemap-cli
@@ -78,6 +78,7 @@ jobs:
7878
name: Check for dead links
7979
runs-on: ubuntu-latest
8080
steps:
81+
- uses: dtolnay/rust-toolchain@stable
8182
- name: Checkout pandocs
8283
uses: actions/checkout@v4
8384
with:
@@ -88,17 +89,10 @@ jobs:
8889
with:
8990
workspaces: pandocs/
9091

91-
- name: Install mdbook
92-
uses: peaceiris/actions-mdbook@v2
93-
with:
94-
mdbook-version: 0.4.40
95-
96-
# FIXME: Keep this up to date
97-
- name: Install mdbook-linkcheck
98-
run: | # `-L` because GitHub performs a redirection
99-
curl -L -o mdbook-linkcheck.zip "https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v${MDBOOK_LINKCHECK_VER}/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip"
100-
unzip mdbook-linkcheck.zip mdbook-linkcheck
101-
chmod +x mdbook-linkcheck
92+
- name: Install mdbook dependencies
93+
run: |
94+
cargo install mdbook@${MDBOOK_VERSION}
95+
cargo install mdbook-linkcheck2@${MDBOOK_LINKCHECK2_VERSION}
10296
10397
- name: Install Python dependencies
10498
run: |
@@ -107,10 +101,7 @@ jobs:
107101
108102
- name: Check links
109103
working-directory: pandocs/
110-
env:
111-
MDBOOK_OUTPUT__LINKCHECK__COMMAND: "../mdbook-linkcheck"
112-
run: |
113-
mdbook build
104+
run: mdbook build
114105

115106
deploy:
116107
name: Deploy to GitHub pages

book.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ git-repository-url = "https://github.com/gbdev/pandocs"
3838
edit-url-template = "https://github.com/gbdev/pandocs/edit/master/{path}"
3939
site-url = "/pandocs/"
4040

41-
[output.linkcheck]
41+
[output.linkcheck2]
4242
follow-web-links = true
4343
traverse-parent-directories = false
4444
optional = true

0 commit comments

Comments
 (0)