Skip to content

Commit 1b68d0a

Browse files
authored
Merge pull request #10 from semiversus/patch-1
Fix CI configuration for pull requests
2 parents 61c10ba + a5e960c commit 1b68d0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ after_success:
5858
- pylint mini_lambda # note that at the moment the report is simply lost, we dont transform the result into anything
5959
# ***documentation***
6060
- mkdocs build -f docs/mkdocs.yml
61+
- if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then exit 0; fi;
6162
- mv reports/junit site/
6263
# mkdocs gh-deploy requires special care :
6364
# ---grant the possibility to push on the repo---
@@ -71,7 +72,7 @@ after_success:
7172
- git fetch gh-remote && git fetch gh-remote gh-pages:gh-pages;
7273
# push but only if this is not a build triggered by a pull request
7374
# note: here we use the --dirty flag so that mkdocs does not clean the additional reports that we copied in the site
74-
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_PYTHON_VERSION}" = "3.5" ]; then echo "Pushing to github"; PYTHONPATH=mini_lambda/ mkdocs gh-deploy -v --dirty -f docs/mkdocs.yml --remote-name gh-remote; git push gh-remote gh-pages; fi;
75+
- if [ "${TRAVIS_PYTHON_VERSION}" = "3.5" ]; then echo "Pushing to github"; PYTHONPATH=mini_lambda/ mkdocs gh-deploy -v --dirty -f docs/mkdocs.yml --remote-name gh-remote; git push gh-remote gh-pages; fi;
7576
# - if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_PYTHON_VERSION}" = "3.5" ]; then echo "Pushing to github"; git push gh-remote gh-pages; fi;
7677

7778
deploy:

0 commit comments

Comments
 (0)