Publish book from both the edge and beta channels

This commit is contained in:
Michael Vines
2019-01-12 10:43:25 -08:00
committed by Grimes
parent 5b92286568
commit 5d3847d14d

View File

@ -16,18 +16,29 @@ echo --- create book repo
git commit -m "${BUILDKITE_COMMIT:-local}" git commit -m "${BUILDKITE_COMMIT:-local}"
) )
echo --- publish eval "$(ci/channel-info.sh)"
if [[ $BUILDKITE_BRANCH = master ]]; then # Only publish the book from the edge and beta channels for now.
case $CHANNEL in
edge)
repo=git@github.com:solana-labs/book-edge.git
;;
beta)
repo=git@github.com:solana-labs/book.git
;;
*)
echo "--- publish skipped"
exit 0
;;
esac
echo "--- publish $CHANNEL"
cd book/html/ cd book/html/
git remote add origin git@github.com:solana-labs/solana.git git remote add origin $repo
git fetch origin gh-pages git fetch origin master
if ! git diff HEAD origin/gh-pages --quiet; then if ! git diff HEAD origin/master --quiet; then
git push -f origin HEAD:gh-pages git push -f origin HEAD:master
else else
echo "Content unchanged, publish skipped" echo "Content unchanged, publish skipped"
fi fi
else
echo "Publish skipped"
fi
exit 0 exit 0