Skip to content

Commit

Permalink
build: better mdbook install
Browse files Browse the repository at this point in the history
  • Loading branch information
ParaN3xus committed Feb 6, 2024
1 parent c483df7 commit 665368f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@ jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: 0.4.36
steps:
- uses: actions/checkout@v4
- name: Install mdBook
run: |
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
rustup update
cargo install --version ${MDBOOK_VERSION} mdbook
version=$(wget -qO- -t1 -T2 "https://api.github.com/repos/rust-lang/mdBook/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
wget "https://github.com/rust-lang/mdBook/releases/download/$version/mdbook-$version-x86_64-unknown-linux-gnu.tar.gz"
tar -xzf "mdbook-$version-x86_64-unknown-linux-gnu.tar.gz"
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
Expand Down

0 comments on commit 665368f

Please sign in to comment.