chore(docs): Add just task to deploy the book

This commit is contained in:
Awiteb 2024-05-17 01:58:51 +03:00
parent f9d36a2dd7
commit 7f8e80c645
Signed by: awiteb
GPG key ID: 3F6B55640AA6682F

View file

@ -28,3 +28,24 @@ _default:
echo "Checking MSRV ({{msrv}})" echo "Checking MSRV ({{msrv}})"
cargo +{{msrv}} check -q cargo +{{msrv}} check -q
echo "MSRV is correct" echo "MSRV is correct"
# Deploy the book to Github Pages
@deploy:
#!/usr/bin/env bash
mdbook build
cd book
git init .
git checkout -B gh-pages
touch .nojekyll
git add .
git commit -m "Deploy the book to github pages"
git remote add origin "https://github.com/TheAwiteb/lprs-book"
git push origin gh-pages -f
cd ..
rm -fr book
# Install book dependencies
@install-book-tools:
cargo install mdbook