File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 22
33set -e
44
5- function pushDocs () {
65
6+ function buildDocs () {
77 echo " Building JSON documentation..."
88 PYTHONPATH=_testing python scripts/generate_json_docs.py --tag ${1}
99 echo " Done building JSON documentation."
10+ }
11+
1012
13+ function pushDocs () {
1114 echo " Deploying JSON documentation..."
1215 if [[ ! -d " ghpages" ]]; then
1316 git submodule add -f -b gh-pages https://${GH_OAUTH_TOKEN} @github.com/${GH_OWNER} /${GH_PROJECT_NAME} ghpages
@@ -41,13 +44,18 @@ function cleanSubmodule () {
4144 echo " Done cleaning up!"
4245}
4346
47+ # Run this to verifiy that the docs build successfully.
48+ buildDocs $TRAVIS_BRANCH
49+
4450if [ " ${TRAVIS_BRANCH} " == " master" ] && [ " ${TRAVIS_PULL_REQUEST} " == " false" ]; then
51+ buildDocs $TRAVIS_BRANCH
4552 pushDocs $TRAVIS_BRANCH
4653 cleanSubmodule
4754 echo " Done pushing docsite. See: https://googlecloudplatform.github.io/gcloud-python/"
4855fi
4956
5057if [[ ! -z $TRAVIS_TAG ]]; then
58+ buildDocs $TRAVIS_TAG
5159 pushDocs $TRAVIS_TAG
5260 cleanSubmodule
5361 echo " Done pushing docsite. See: https://googlecloudplatform.github.io/gcloud-python/"
You can’t perform that action at this time.
0 commit comments