I know I can do something like this to deploy commits in a branch:
deployment:
staging:
branch: develop
commands:
- npm run build
And according to the docs, you can also build from a tag:
deployment:
production:
tag: /production-.*/
commands:
- npm run build
But can you combine the two? I only want to create a new production build on new production-*
tags in the master branch. What if both master and develop are at the same commit and I add a tag. In which branch will the build be created? This matters to me, because based on which branch npm run build
is run from it creates either a staging or production build.
I’ll change my build script soon to explicitly take a env parameter but for now it’d be good to get this working with the current scripts.