FeathersJS deployment - Gitlab CI/CD - Heroku
Deploying FeathersJS apps with Gitlab couldn’t be easier with the integrated CI/CD process. Here is how I am deploying to Heroku for staging enviroments. This is my
.gitlab-ci.yml file in the root of my project.
|- npm i|
|- npm test|
|- gem install dpl|
|- dpl --provider=heroku --app=$HEROKU_APP --api-key=$HEROKU_CI_API_KEY|
Log in to Gitlab and set up some CI/CD secrets which contain your
HEROKU_APP which is the name of the app within Heroku, and your
HEROKU_CI_API_KEY which is your key used for deploying.
Create an app within Heroku with the same name as
HEROKU_NAME if you have not already done so.
Push to your development branch and you should see the two stages within your pipeline, one for tests and one for deployment. Assuming your tests pass then your app should be deployed to Heroku.
If you see anything that is wrong or can be improved please get in touch.
Thanks for reading!