Publish book only on content changes instead of on every commit

This commit is contained in:
Michael Vines 2018-12-17 15:35:59 -08:00
parent 69d7384cc0
commit 29776c0283
1 changed files with 7 additions and 5 deletions

View File

@ -35,12 +35,14 @@ echo --- create book repo
echo --- publish
if [[ $BUILDKITE_BRANCH = master ]]; then
(
set -x
cd book/html/
git remote add origin git@github.com:solana-labs/solana.git
cd book/html/
git remote add origin git@github.com:solana-labs/solana.git
git fetch origin gh-pages
if ! git diff HEAD origin/gh-pages --quiet; then
git push -f origin HEAD:gh-pages
)
else
echo "Content unchanged, publish skipped"
fi
else
echo "Publish skipped"
fi