Setting up travis to push updated docs.
This commit is contained in:
@@ -2,15 +2,19 @@ language: python
|
|||||||
python: 2.7
|
python: 2.7
|
||||||
sudo: false
|
sudo: false
|
||||||
env:
|
env:
|
||||||
|
matrix:
|
||||||
- TOX_ENV=py26
|
- TOX_ENV=py26
|
||||||
- TOX_ENV=py27
|
- TOX_ENV=py27
|
||||||
- TOX_ENV=py33
|
- TOX_ENV=py33
|
||||||
- TOX_ENV=py34
|
- TOX_ENV=py34
|
||||||
- TOX_ENV=pypy
|
- TOX_ENV=pypy
|
||||||
|
global:
|
||||||
|
secure: Dxq/BYQ9e2GVyQQifNGhw3R1AHhUAiJuS4L/ow23IAYWO6wd9ZPGSjyn6C+VJRwlEXXwhkYSzOuJdfr+FR5sENMRAwIx1z2gOzOjxaLZRxm1bLDnUlP0wld+0m4UwLMZuLzA30gSR6RZo+S6IGhYCiFYmpDqSgwQihIM2vOmUz4=
|
||||||
install:
|
install:
|
||||||
- pip install tox
|
- pip install tox
|
||||||
script:
|
script:
|
||||||
- tox -e $TOX_ENV
|
- tox -e $TOX_ENV
|
||||||
|
- [ $TRAVIS_BRANCH = master ] && tox -e pushdocs
|
||||||
after_success:
|
after_success:
|
||||||
- tox -e coveralls
|
- tox -e coveralls
|
||||||
notifications:
|
notifications:
|
||||||
|
|||||||
23
scripts/push-docs
Normal file
23
scripts/push-docs
Normal 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
|
||||||
4
tox.ini
4
tox.ini
@@ -51,7 +51,9 @@ basepython = python2.7
|
|||||||
deps =
|
deps =
|
||||||
{[testenv:docs]deps}
|
{[testenv:docs]deps}
|
||||||
ghp-import
|
ghp-import
|
||||||
commands = {toxinidir}/scripts/push-docs
|
commands =
|
||||||
|
{toxinidir}/scripts/build-docs
|
||||||
|
{toxinidir}/scripts/push-docs
|
||||||
|
|
||||||
[testenv:py26]
|
[testenv:py26]
|
||||||
basepython = python2.6
|
basepython = python2.6
|
||||||
|
|||||||
Reference in New Issue
Block a user