fix(travis): BUILD_LEADER is not available in build.sh

Replace with check that TRAVIS_JOB_NUMBER ends at .1.
Do not publish docs on pull requests.

Closes #1362