1
0
Fork 0
mirror of synced 2025-09-23 20:28:36 +00:00

add publishing job

This commit is contained in:
Stefan Deml 2018-12-08 00:14:15 +00:00
parent 80b20082a0
commit fd0c512bfd
2 changed files with 18 additions and 1 deletions

View file

@ -33,10 +33,13 @@ jobs:
- run:
name: Generate code coverage report
command: ./scripts/cov.sh
- run:
name: Publish book
command: ./scripts/publish_book.sh
- save_cache:
paths:
- /usr/local/cargo/registry
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
key: v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}

14
scripts/publish_book.sh Executable file
View file

@ -0,0 +1,14 @@
# Exit if any subcommand fails
set -e
apt-get update
apt-get -qq install git python-minimal
python --version
cargo install mdbook
cd zokrates_book && mdbook build
git config --global user.email "stefan.deml+zokratesbot@decentriq.ch"
git clone https://github.com/Zokrates/zokrates.github.io.git
git clone https://github.com/davisp/ghp-import.git
cd zokrates.github.io
../ghp-import/ghp_import.py -n -p -f -m "Documentation upload" -b "master" -r https://17cd8c4c351b617eba3847d4f2af39c997e9758b@github.com/Zokrates/zokrates.github.io.git ../book
echo "Published book"