Publish book only on content changes instead of on every commit
This commit is contained in:
parent
69d7384cc0
commit
29776c0283
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue