简体   繁体   中英

Continuous Deployment of a NodeJS using GitLab Ask Question

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?

请参阅以下问题使用 GitLab链接将 Node.js 应用程序持续部署到 Heroku

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM