How do I configure my
.travis.yaml to deploy only on a successful PR merge to
This is my current
language: node_js node_js: - 14 cache: yarn: true directories: - node_modules - .next/cache jobs: include : - stage: "Build 🛠️" script: yarn cp-env:qa && yarn build - stage: "Deploy 🚀" if: branch = master script : yarn deploy-qa
But every time I open a new PR on a branch →
master, both the “Build ” and “Deploy ” stages run. I want only the “Build ” to run on a new PR, and then to have the “Deploy ” stage run once the PR’s been merged to master.
How can I accomplish this?