diff --git a/.github/workflows/mdbook.yml b/.github/workflows/mdbook.yml index 40b1fb4..0ea476c 100644 --- a/.github/workflows/mdbook.yml +++ b/.github/workflows/mdbook.yml @@ -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