2

I want to have one repo and two heroku apps connected to it and have the branches in my repo point to the apps for CI/CD example: the main branch is for the herokuapp "live-prod" and the dev branch is for the herokuapp "live-dev" any time i push changes to one of the branches I want the code pushed to live The repo is hosted on gitlab In the root of my nodeJS project I have a file called .gitlab-ci.yml with the following contents

heroku_deploy:
  stage: production
  script:
    - gem install dpl
    - dpl --provider=heroku --app=$HEROKU_APP_NAME_LIVE_PROD --api-key=$HEROKU_PRODUCTION_KEY

But I take this only works for one branch. How do I make it check what branch I am pushing to so I can set --app to HEROKU_APP_NAME_LIVE_PROD or HEROKU_APP_NAME_LIVE_DEV

Beefy.py
  • 57
  • 1
  • 6

0 Answers0