Skip to content

Commit

Permalink
ci: try to download the mdbook-admonish binary instead
Browse files Browse the repository at this point in the history
  • Loading branch information
insertish committed May 27, 2024
1 parent 636c76e commit 58e65ff
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,20 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.4" mdbook)
- run: cargo install --vers "^1.17" mdbook-admonish
- name: Install latest mdbook
run: |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
mkdir mdbook
curl -sSL $url | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Install latest mdbook-admonish
run: |
tag=$(curl 'https://api.github.com/repos/tommilligan/mdbook-admonish/releases/latest' | jq -r '.tag_name')
url="https://github.com/tommilligan/mdbook-admonish/releases/download/${tag}/mdbook-admonish-${tag}-x86_64-unknown-linux-gnu.tar.gz"
mkdir mdbook-admonish
curl -sSL $url | tar -xz --directory=./mdbook-admonish
echo `pwd`/mdbook-admonish >> $GITHUB_PATH
- name: Build Book
run: |
mdbook build
Expand Down

0 comments on commit 58e65ff

Please sign in to comment.