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
|
||||
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://zokratesbot:"$GH_TOKEN"@github.com/Zokrates/zokrates.github.io.git ../book
|
||||
echo "Published book"
|
||||
if [["$CIRCLE_BRANCH" == "master"]]; then
|
||||
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
|
||||
{
|
||||
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