Skip to content

Commit ad1b272

Browse files
committed
Don't recompile mdbook from scratch
1 parent fcf720e commit ad1b272

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/mdbook.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ jobs:
3333
MDBOOK_VERSION: ^0.5
3434
steps:
3535
- uses: actions/checkout@v4
36-
- name: Install mdBook
36+
- name: Install latest mdbook
3737
run: |
38-
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
39-
rustup update
40-
cargo install --version ${MDBOOK_VERSION} mdbook
38+
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
39+
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
40+
mkdir mdbook
41+
curl -sSL $url | tar -xz --directory=./mdbook
42+
echo `pwd`/mdbook >> $GITHUB_PATH
4143
- name: Setup Pages
4244
id: pages
4345
uses: actions/configure-pages@v5

0 commit comments

Comments
 (0)