33# Licensed under the Apache License, Version 2.0 (the "License");
44# you may not use this file except in compliance with the License.
55# You may obtain a copy of the License at
6- #
6+ #
77# http://www.apache.org/licenses/LICENSE-2.0
88#
99# Unless required by applicable law or agreed to in writing, software
@@ -49,8 +49,8 @@ if [[ "${BUILD_RELEASE}" == "unstable" ]]; then
4949 DOCS_DIR=" unstable"
5050 elif [[ " ${BUILD_FOCUS} " = " next" ]]; then
5151 DOCS_DIR=" next-unstable"
52- else
53- _exit " Unknown build focus" 1
52+ else
53+ _exit " Unknown build focus" 1
5454 fi
5555
5656elif [[ " ${BUILD_RELEASE} " == " stable" ]]; then
@@ -59,8 +59,8 @@ elif [[ "${BUILD_RELEASE}" == "stable" ]]; then
5959 DOCS_DIR=" latest"
6060 elif [[ " ${BUILD_FOCUS} " = " next" ]]; then
6161 DOCS_DIR=" next"
62- else
63- _exit " Unknown build focus" 1
62+ else
63+ _exit " Unknown build focus" 1
6464 fi
6565
6666else
@@ -76,8 +76,13 @@ cp -rf ${DIR}/packages/composer-website/jekylldocs/_site/* ${TODIR}/${DOCS_DIR}/
7676
7777# Add all the changes, commit, and push to the GitHub repository.
7878cd ${TODIR}
79- git add .
80- git commit -m " Automatic deployment of website"
81- git push origin gh-pages
79+ if git status --porcelain | grep . > /dev/null; then
80+ echo " Found doc changes to push"
81+ git add .
82+ git commit -m " Automatic deployment of website"
83+ git push origin gh-pages
84+ else
85+ echo " No doc changes to push"
86+ fi
8287
8388_exit " All complete" 0
0 commit comments