Setting up travis to push updated docs.

This commit is contained in:
Craig Citro
2015-01-06 01:56:28 -08:00
parent 39099eb86f
commit 8d4377656c
3 changed files with 33 additions and 4 deletions

View File

@@ -2,16 +2,20 @@ language: python
python: 2.7
sudo: false
env:
matrix:
- TOX_ENV=py26
- TOX_ENV=py27
- TOX_ENV=py33
- TOX_ENV=py34
- TOX_ENV=pypy
global:
secure: Dxq/BYQ9e2GVyQQifNGhw3R1AHhUAiJuS4L/ow23IAYWO6wd9ZPGSjyn6C+VJRwlEXXwhkYSzOuJdfr+FR5sENMRAwIx1z2gOzOjxaLZRxm1bLDnUlP0wld+0m4UwLMZuLzA30gSR6RZo+S6IGhYCiFYmpDqSgwQihIM2vOmUz4=
install:
- pip install tox
- pip install tox
script:
- tox -e $TOX_ENV
- tox -e $TOX_ENV
- [ $TRAVIS_BRANCH = master ] && tox -e pushdocs
after_success:
- tox -e coveralls
- tox -e coveralls
notifications:
email: false

23
scripts/push-docs Normal file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
#
# Copyright 2014 Google Inc. All rights reserved.
#
# 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
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Push a new version of the docs.
if [[ "${TRAVIS_BRANCH}" == "master" ]] && \
[[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
ghp-import -n docs/_build/html
git push -fq https://${GH_OAUTH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
fi

View File

@@ -51,7 +51,9 @@ basepython = python2.7
deps =
{[testenv:docs]deps}
ghp-import
commands = {toxinidir}/scripts/push-docs
commands =
{toxinidir}/scripts/build-docs
{toxinidir}/scripts/push-docs
[testenv:py26]
basepython = python2.6