Skip to content

Commit dc72a8e

Browse files
committed
Only run ci/after_success.sh, if a PR is merged
This should do the following: 1. Not run the code in `ci/after_success.sh` when a pull request is built, as the secret variable `GH_TOKEN` is not available then, which will cause a build error. 2. Run said script after a pull request has been merged to master, to automatically update documentation on gh-pages. I know that 1. actually happens. I have no idea about 2.
1 parent 120ef2d commit dc72a8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ci/after_success.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ main() {
1515
echo OK
1616
}
1717

18-
if [ $TRAVIS_BRANCH = master ]; then
18+
if [ "$TRAVIS_EVENT_TYPE" == "push" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
1919
main
2020
fi

0 commit comments

Comments
 (0)