only publish master branch and add tag to commit msg
This commit is contained in:
parent
614b9f118a
commit
cb9a482fe4
1 changed files with 19 additions and 11 deletions
|
@ -1,14 +1,22 @@
|
||||||
# Exit if any subcommand fails
|
# Exit if any subcommand fails
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
apt-get update
|
if [["$CIRCLE_BRANCH" == "master"]]; then
|
||||||
apt-get -qq install git python-minimal
|
apt-get update
|
||||||
python --version
|
apt-get -qq install git python-minimal
|
||||||
cargo install mdbook
|
python --version
|
||||||
cd zokrates_book && mdbook build
|
cargo install mdbook
|
||||||
git config --global user.email "stefan.deml+zokratesbot@decentriq.ch"
|
cd zokrates_book && mdbook build
|
||||||
git clone https://github.com/Zokrates/zokrates.github.io.git
|
git config --global user.email "stefan.deml+zokratesbot@decentriq.ch"
|
||||||
git clone https://github.com/davisp/ghp-import.git
|
git clone https://github.com/Zokrates/zokrates.github.io.git
|
||||||
cd zokrates.github.io
|
git clone https://github.com/davisp/ghp-import.git
|
||||||
../ghp-import/ghp_import.py -n -p -f -m "Documentation upload" -b "master" -r https://zokratesbot:"$GH_TOKEN"@github.com/Zokrates/zokrates.github.io.git ../book
|
cd zokrates.github.io
|
||||||
echo "Published book"
|
{
|
||||||
|
TAG=$(git describe --tags) && echo $TAG
|
||||||
|
} || {
|
||||||
|
echo "No tag found"
|
||||||
|
}
|
||||||
|
../ghp-import/ghp_import.py -n -p -f -m "Documentation upload $TAG" -b "master" -r https://zokratesbot:"$GH_TOKEN"@github.com/Zokrates/zokrates.github.io.git ../book
|
||||||
|
echo "Published book"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue