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.
cd book/html/ case $CHANNEL in
git remote add origin git@github.com:solana-labs/solana.git edge)
git fetch origin gh-pages repo=git@github.com:solana-labs/book-edge.git
if ! git diff HEAD origin/gh-pages --quiet; then ;;
git push -f origin HEAD:gh-pages beta)
else repo=git@github.com:solana-labs/book.git
echo "Content unchanged, publish skipped" ;;
fi *)
echo "--- publish skipped"
exit 0
;;
esac
echo "--- publish $CHANNEL"
cd book/html/
git remote add origin $repo
git fetch origin master
if ! git diff HEAD origin/master --quiet; then
git push -f origin HEAD:master
else else
echo "Publish skipped" echo "Content unchanged, publish skipped"
fi fi
exit 0 exit 0