Created
March 25, 2020 09:20
-
-
Save lokialice/2f202fa8442c0396e6bbe84896160067 to your computer and use it in GitHub Desktop.
gitlab-ci.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
- deploy development | |
- deploy production | |
deploy_dev_stage: | |
stage: deploy development | |
environment: | |
name: deploying | |
only: | |
- develop | |
before_script: | |
- echo "PORT=$PORT" >> .env | |
- echo "NODE_ENV=$NODE_ENV" >> .env | |
script: | |
- npm install | |
- pm2 start ecosystem.config.js --update-env | |
deploy_prod_stage: | |
stage: deploy production | |
environment: | |
name: deployProduction | |
only: | |
- tags | |
when: | |
manual | |
tags: | |
- prod | |
before_script: | |
- echo "PORT=$PORT" >> .env | |
- echo "NODE_ENV=$NODE_ENV_PROD" >> .env | |
script: | |
- npm install | |
- pm2 start ecosystem.config.js --update-env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment