diff --git a/doctr/travis.py b/doctr/travis.py index 0f15eca5..e81b5a3c 100644 --- a/doctr/travis.py +++ b/doctr/travis.py @@ -575,10 +575,9 @@ def determine_push_rights(*, branch_whitelist, TRAVIS_BRANCH, """ canpush = True - if TRAVIS_TAG: - if not build_tags: - print("The docs are not pushed on tag builds. To push on future tag builds, use --build-tags") - return build_tags + if TRAVIS_TAG and not build_tags: + print("The docs are not pushed on tag builds. To push on future tag builds, use --build-tags") + canpush = False if not any([re.compile(x).match(TRAVIS_BRANCH) for x in branch_whitelist]): print("The docs are only pushed to gh-pages from master. To allow pushing from "