Make build fail if upload fails
This commit is contained in:
parent
b793f72732
commit
184ceb8daa
18
.travis.yml
18
.travis.yml
|
@ -3,12 +3,12 @@ python: "3.5"
|
||||||
# command to install dependencies
|
# command to install dependencies
|
||||||
install: pip install 'Nikola[extras]'
|
install: pip install 'Nikola[extras]'
|
||||||
# command to run tests
|
# command to run tests
|
||||||
script: nikola build
|
script: |
|
||||||
after_success: |
|
nikola build &&
|
||||||
[ $TRAVIS_BRANCH = master ] &&
|
if [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ]; then
|
||||||
[ $TRAVIS_PULL_REQUEST = false ] &&
|
virtualenv -p python2.7 /tmp/venv &&
|
||||||
virtualenv -p python2.7 /tmp/venv &&
|
. /tmp/venv/bin/activate &&
|
||||||
. /tmp/venv/bin/activate &&
|
pip install ghp-import &&
|
||||||
pip install ghp-import &&
|
ghp-import -n output &&
|
||||||
ghp-import -n output &&
|
git push -qf https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages >/dev/null 2>&1
|
||||||
git push -qf https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages >/dev/null 2>&1
|
fi
|
||||||
|
|
Loading…
Reference in New Issue