Download mdBook if it doesn't exist
This commit is contained in:
parent
121e22d2c5
commit
9bf49a225d
@ -8,9 +8,6 @@ build:
|
|||||||
script:
|
script:
|
||||||
- pip install pre-commit
|
- pip install pre-commit
|
||||||
- pre-commit run -a --hook-stage=manual
|
- pre-commit run -a --hook-stage=manual
|
||||||
- wget https://github.com/rust-lang/mdBook/releases/download/v0.4.13/mdbook-v0.4.13-x86_64-unknown-linux-gnu.tar.gz -O mdbook.tgz
|
|
||||||
- tar zxvf mdbook.tgz
|
|
||||||
- mv mdbook /usr/local/bin/
|
|
||||||
- ./build
|
- ./build
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
|
10
build
10
build
@ -3,6 +3,16 @@
|
|||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
rm -rf public/
|
rm -rf public/
|
||||||
|
|
||||||
|
if [ -x $(which mdbook) ] ; then
|
||||||
|
echo "mdBook found, running..."
|
||||||
|
else
|
||||||
|
echo "mdBook not found, downloading..."
|
||||||
|
wget https://github.com/rust-lang/mdBook/releases/download/v0.4.13/mdbook-v0.4.13-x86_64-unknown-linux-gnu.tar.gz -O mdbook.tgz
|
||||||
|
tar zxvf mdbook.tgz
|
||||||
|
mv mdbook /usr/local/bin/
|
||||||
|
fi
|
||||||
|
|
||||||
mdbook build -d public
|
mdbook build -d public
|
||||||
|
|
||||||
# Make checkboxes editable, just in case the user wants to keep their own checklist.
|
# Make checkboxes editable, just in case the user wants to keep their own checklist.
|
||||||
|
Loading…
Reference in New Issue
Block a user