Skip to content

Commit

Permalink
Only push docs from the master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Feb 12, 2016
1 parent 92b85d2 commit 7e356f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions support/travis-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
archive.extractall(dir)
doxygen = os.path.join(dir, 'doxygen-1.8.10/bin/doxygen')
returncode, repo_dir = __import__('build-docs').build_docs(workdir, doxygen)
if returncode == 0:
if returncode == 0 and os.environ['TRAVIS_BRANCH'] == 'master':
# Push docs to GitHub pages if this is a master branch.
if travis:
check_call(['git', 'config', '--global', 'user.name', 'amplbot'])
check_call(['git', 'config', '--global', 'user.email', '[email protected]'])
# Push docs to GitHub pages.
check_call(['git', 'add', '--all'], cwd=repo_dir)
if call(['git', 'diff-index', '--quiet', 'HEAD'], cwd=repo_dir):
check_call(['git', 'commit', '-m', 'Update documentation'], cwd=repo_dir)
Expand Down

0 comments on commit 7e356f8

Please sign in to comment.