Skip to content

Commit

Permalink
Update mdbook-github-pages.yml: configure tool versions in separate s…
Browse files Browse the repository at this point in the history
…ection
  • Loading branch information
dpolivaev authored Nov 24, 2023
1 parent 4e58529 commit 11e2300
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/mdbook-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

name: mdbook-github-pages

env:
mdbook_version: v0.4.21
mdbook_toc_version: 0.9.0
mdbook_open_on_gh_version: 2.2.0

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
Expand Down Expand Up @@ -36,12 +41,12 @@ jobs:
}
mkdir -p build/tools
cd build/tools
curl -O -L https://github.com/rust-lang/mdBook/releases/download/v0.4.21/mdbook-v0.4.21-x86_64-unknown-linux-gnu.tar.gz
tar xf mdbook-v0.4.21-x86_64-unknown-linux-gnu.tar.gz
curl -O -L https://github.com/badboy/mdbook-toc/releases/download/0.9.0/mdbook-toc-0.9.0-x86_64-unknown-linux-gnu.tar.gz
tar xf mdbook-toc-0.9.0-x86_64-unknown-linux-gnu.tar.gz
curl -O -L https://github.com/badboy/mdbook-open-on-gh/releases/download/2.2.0/mdbook-open-on-gh-2.2.0-x86_64-unknown-linux-gnu.tar.gz
tar xf mdbook-open-on-gh-2.2.0-x86_64-unknown-linux-gnu.tar.gz
curl -O -L https://github.com/rust-lang/mdBook/releases/download/$mdbook_version/mdbook-$mdbook_version-x86_64-unknown-linux-gnu.tar.gz
tar xf mdbook-$mdbook_version-x86_64-unknown-linux-gnu.tar.gz
curl -O -L https://github.com/badboy/mdbook-toc/releases/download/$mdbook_toc_version/mdbook-toc-$mdbook_toc_version-x86_64-unknown-linux-gnu.tar.gz
tar xf mdbook-toc-$mdbook_toc_version-x86_64-unknown-linux-gnu.tar.gz
curl -O -L https://github.com/badboy/mdbook-open-on-gh/releases/download/$mdbook_open_on_gh_version/mdbook-open-on-gh-$mdbook_open_on_gh_version-x86_64-unknown-linux-gnu.tar.gz
tar xf mdbook-open-on-gh-$mdbook_open_on_gh_version-x86_64-unknown-linux-gnu.tar.gz
cd ../..
export PATH="./build/tools/:$PATH"
mdbook build src --dest-dir ../build/gh-pages
Expand Down

0 comments on commit 11e2300

Please sign in to comment.