add publishing job
This commit is contained in:
parent
80b20082a0
commit
fd0c512bfd
2 changed files with 18 additions and 1 deletions
|
@ -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
14
scripts/publish_book.sh
Executable 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"
|
Loading…
Reference in a new issue