Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
Don't try delivering doc changes if there are none (resolves #3977) (#…
Browse files Browse the repository at this point in the history
…3980)

Signed-off-by: Simon Stone <[email protected]>
  • Loading branch information
Simon Stone authored and nklincoln committed May 9, 2018
1 parent b10c086 commit a041af3
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .travis/deploy_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Expand Down Expand Up @@ -49,8 +49,8 @@ if [[ "${BUILD_RELEASE}" == "unstable" ]]; then
DOCS_DIR="unstable"
elif [[ "${BUILD_FOCUS}" = "next" ]]; then
DOCS_DIR="next-unstable"
else
_exit "Unknown build focus" 1
else
_exit "Unknown build focus" 1
fi

elif [[ "${BUILD_RELEASE}" == "stable" ]]; then
Expand All @@ -59,8 +59,8 @@ elif [[ "${BUILD_RELEASE}" == "stable" ]]; then
DOCS_DIR="latest"
elif [[ "${BUILD_FOCUS}" = "next" ]]; then
DOCS_DIR="next"
else
_exit "Unknown build focus" 1
else
_exit "Unknown build focus" 1
fi

else
Expand All @@ -76,8 +76,13 @@ cp -rf ${DIR}/packages/composer-website/jekylldocs/_site/* ${TODIR}/${DOCS_DIR}/

# Add all the changes, commit, and push to the GitHub repository.
cd ${TODIR}
git add .
git commit -m "Automatic deployment of website"
git push origin gh-pages
if git status --porcelain | grep . > /dev/null; then
echo "Found doc changes to push"
git add .
git commit -m "Automatic deployment of website"
git push origin gh-pages
else
echo "No doc changes to push"
fi

_exit "All complete" 0

0 comments on commit a041af3

Please sign in to comment.