52 lines
982 B
YAML
52 lines
982 B
YAML
stages:
|
|
- build
|
|
- deploy
|
|
build-prod:
|
|
stage: build
|
|
rules:
|
|
- if: $CI_COMMIT_TAG =~ /^[\d]\.[\d]\.[\d]-prod$/
|
|
image: node:18
|
|
script:
|
|
- echo $APP_CONFIG_PROD > src/conf.json
|
|
- yarn
|
|
- yarn build
|
|
artifacts:
|
|
paths:
|
|
- build
|
|
build-stage:
|
|
stage: build
|
|
rules:
|
|
- if: $CI_COMMIT_TAG =~ /^[\d]\.[\d]\.[\d]-stage$/
|
|
image: node:18
|
|
script:
|
|
- echo $APP_CONFIG_STAGE > src/conf.json
|
|
- yarn
|
|
- yarn build
|
|
artifacts:
|
|
paths:
|
|
- build
|
|
deploy-prod:
|
|
stage: deploy
|
|
environment:
|
|
name: production
|
|
url: https://otpauth.thern.wtf
|
|
rules:
|
|
- if: $CI_COMMIT_TAG =~ /^[\d]\.[\d]\.[\d]-prod$/
|
|
tags:
|
|
- shell
|
|
- prod
|
|
script:
|
|
- rsync -a build/* /var/www/otpauth/
|
|
deploy-stage:
|
|
stage: deploy
|
|
environment:
|
|
name: staging
|
|
url: https://otpauth-staging.thern.wtf
|
|
rules:
|
|
- if: $CI_COMMIT_TAG =~ /^[\d]\.[\d]\.[\d]-stage$/
|
|
tags:
|
|
- shell
|
|
- staging
|
|
script:
|
|
- rsync -a build/* /var/www/otpauth_staging/
|