Skip to content

Commit b7ab5ab

Browse files
committed
Update CI to build the mdbook with multiple mdbook versions.
1 parent 51345ab commit b7ab5ab

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

.github/workflows/book.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,33 @@ on:
99
- created
1010

1111
jobs:
12-
build:
12+
build-mdbook:
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
mdbook-version: ['0.4.45', '0.5.1', 'latest']
1417
steps:
15-
- name: Install cargo
16-
uses: actions-rs/toolchain@v1
18+
- name: Install mdBook
19+
uses: peaceiris/actions-mdbook@v2
1720
with:
18-
toolchain: stable
19-
profile: minimal
20-
21-
- name: Install mdbook
22-
run: curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.45/mdbook-v0.4.45-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=$HOME/.cargo/bin
21+
mdbook-version: ${{ matrix.mdbook-version }}
2322

2423
- name: Checkout source
2524
uses: actions/checkout@v4
2625

2726
- name: Build book
2827
run: mdbook build
2928

30-
- name: Upload book artifact
29+
- name: Upload html-book artifact
30+
if: matrix.mdbook-version == 'latest'
3131
uses: actions/upload-artifact@v4
3232
with:
3333
name: book
3434
path: book
3535

3636
deploy:
3737
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
38-
needs: build
38+
needs: build-mdbook
3939
runs-on: ubuntu-latest
4040
steps:
4141
- name: Download book artifact

book.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ authors = ["Robert N. M. Watson", "Alexander Richardson", "Brooks Davis",
33
"John Baldwin", "David Chisnall", "Jessica Clarke", "Nathaniel Filardo",
44
"Simon W. Moore", "Edward Napierala", "Peter Sewell", "Peter G. Neumann"]
55
language = "en"
6-
multilingual = false
76
src = "src"
87
title = "CHERI C/C++ Programming Guide"
98

0 commit comments

Comments
 (0)