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

Commit a041af3

Browse files
Simon Stonenklincoln
authored andcommitted
Don't try delivering doc changes if there are none (resolves #3977) (#3980)
Signed-off-by: Simon Stone <[email protected]>
1 parent b10c086 commit a041af3

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.travis/deploy_docs.sh

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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

5656
elif [[ "${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

6666
else
@@ -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.
7878
cd ${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

Comments
 (0)