automatically_update_github_pages_with_travis_example icon indicating copy to clipboard operation
automatically_update_github_pages_with_travis_example copied to clipboard

Avoid multiple builds

Open bguiz opened this issue 10 years ago • 1 comments

I have solved the problem that you describe here:

"One drawback of this is that if you have a build matrix that builds your project with multiple versions of your platform, you'll end up with the same number of pages builds. Which seems redundant."

Essentially, compare the build number to the job number, and allow only the first (or whichever index) to pass through. Example:

https://github.com/bguiz/plugin-registry/blob/59b0601d30ab8e75caaf9958aac4618277321cbd/.travis.yml#L17

Thanks for writing your blog post, BTW!

bguiz avatar Apr 15 '15 11:04 bguiz

Another way to accomplish this is using deploy with an on conditional as described in the third example here: https://docs.travis-ci.com/user/deployment/#Examples-of-Conditional-Releases-using-on%3A

jreyes33 avatar Oct 11 '16 23:10 jreyes33