converter/.gitlab-ci.yml

64 lines
934 B
YAML

stages:
- build
- cleanup_build
- deploy
# - cleanup
.run_deploy: &run_deploy
script:
- chmod +x ./deploy.sh
- ./deploy.sh
# dependencies:
# - build_job
build_job:
stage: build
script:
- npm install
- npm run build
tags:
- javascript
except:
- tags
artifacts:
paths:
- dist
expire_in: 30 min
cleanup_build_job:
stage: cleanup_build
script:
- rm -rf node_modules
- rm -rf dist
when: on_failure
pages:
stage: deploy
environment: staging
except:
- tags
- master
script:
- mv dist public
artifacts:
paths:
- public
dependencies:
- build_job
production:
stage: deploy
<<: *run_deploy
environment: production
only:
- master
variables:
ENVIRON: production
TARGET: $WWW_DEPLOY_ROOT_PRODUCTION
#cleanup_job:
# stage: cleanup
# script:
# - rm -rf node_modules
# - rm -rf typings
# when: always