Reputation: 1025
So I have a Jekyll website being built by Travis-CI automatically after GitHub pushes and then published to Amazon S3. It works great, but I would like to extend it a little further. Basically I'd like to be able to detect which branch is being built and use that branch name to decide what S3 bucket to publish to, such as
branch dev
bucket myapp.{branchname} = myapp.dev
branch qa
bucket myapp.{branchname} = myapp.qa
branch prod
bucket myapp.{branchname} = myapp.prod
Is this possible? And if so, how?
Nick.
Upvotes: 1
Views: 194
Reputation: 1025
Okay I got it, you need to use $TRAVIS_BRANCH in the '.travis.yml' file, it will be replaced with the branch name.
Upvotes: 2