I have an API developed in NodeJS and have successfully set up continuous integration via a .gitlab-ci.yml file. The next stage is to set up continuous deployment to Heroku.
There are plenty of tutorials covering the deployment of Ruby and Python apps but nothing on NodeJS. Currently my .gitlab-ci.yml file looks like this:
image: node:latest
stages:
- production
production:
type: deploy
stage: production
image: ruby:latest
script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl
- dpl --provider=heroku --app=app-heroku --api-key=key
only:
- master
I have two repositories on the heroku, the first for development, the second for production. First, I upload gitlab development to a branch, and this is deployed on heroku in the development repository. And if I upload a gitlab wizard to a branch, then on heroku it is deployed in a repository for production. How can this be implemented?