The question you mentioned regards deploying travis build. So on:
condition only determines if build is deployed or not. Regardless this setting other build steps are executed on each commit/pull request.
What you could use instead is adding [ci skip]
or [skip ci]
in commit messages to force build skipping .
You can also use TRAVIS_COMMIT_MESSAGE
default env variable in all your build steps to determine if step should be executed or skipped, eg
script: if [[ $TRAVIS_COMMIT_MESSAGE == *"trigger build"* ]]; then mvn install ; fi ;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.