Perform Travis deployment setup only when deploying #385
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Steps in
before_install
are run for all builds, not just deploys.For branches/PRs from forks of this repo the install step fails as the user will not have access to the ENV vars used to decrypt files, like
encrypted_909ac1036a94_key
. This was caught in #383, where a forked PR build consistently fails on theopenssl
step.Steps specified in
before_deploy
are only run if a deployment is triggered [1], which will only happen onmaster
, which can't be triggered by a forked user.Also adds a couple of inline comments to help explain the steps, which are a little obtuse at first glance.
[1] Travis
before_deploy
documentation