Skip to content

Commit 93a9ea3

Browse files
committed
Upgrade gb-asm-tutorial to use mdbook 0.5
This commit updates the various unpublished crates in the repo to be set up according to the new requirements imposed by mdbook 0.5. In addition, it updates the build and deploy workflow to account for these changes as well. As part of this update, the theme/index.hbs had to be updated to work with some syntax changes made for mdbook 0.5. The style looked off in my browser, so I would appreciate some double checking on this front.
1 parent 4735b27 commit 93a9ea3

File tree

15 files changed

+601
-2228
lines changed

15 files changed

+601
-2228
lines changed

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

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,27 @@ permissions:
99
id-token: write
1010

1111
env:
12-
MDBOOK_LINKCHECK_VER: 0.7.7
12+
MDBOOK_VERSION: 0.5.2
13+
MDBOOK_LINKCHECK2_VERSION: 0.12.0
1314

1415
jobs:
1516
build:
1617
runs-on: ubuntu-latest
1718
steps:
19+
- uses: dtolnay/rust-toolchain@stable
1820
- name: Checkout gb-asm-tutorial
1921
uses: actions/checkout@v2
2022
with:
2123
path: gb-asm-tutorial
2224

23-
- name: Install mdbook
24-
uses: peaceiris/actions-mdbook@v1
25-
with:
26-
mdbook-version: 0.4.52
25+
- name: Install mdbook dependencies
26+
run: |
27+
cargo install mdbook@${MDBOOK_VERSION}
28+
cargo install mdbook-linkcheck2@${MDBOOK_LINKCHECK2_VERSION}
2729
2830
- name: Install static-sitemap-cli
2931
run: npm install static-sitemap-cli
3032

31-
# FIXME: Keep this up to date
32-
- name: Install mdbook-linkcheck
33-
run: | # `-L` because GitHub performs a redirection
34-
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"
35-
unzip mdbook-linkcheck.zip mdbook-linkcheck
36-
chmod +x mdbook-linkcheck
37-
3833
- name: Cache build dir
3934
uses: actions/cache@v4
4035
with:
@@ -47,8 +42,7 @@ jobs:
4742
working-directory: gb-asm-tutorial/
4843
env:
4944
MDBOOK_BUILD__CREATE_MISSING: "false" # Prevent creating missing files in SUMMARY.md
50-
MDBOOK_OUTPUT__LINKCHECK__COMMAND: "../mdbook-linkcheck"
51-
MDBOOK_OUTPUT__LINKCHECK__OPTIONAL: "false"
45+
MDBOOK_OUTPUT__LINKCHECK2__OPTIONAL: "false"
5246
run: |
5347
mdbook build
5448
for f in po/*.po; do

0 commit comments

Comments
 (0)