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 tsc tags: - javascript except: - tags artifacts: paths: - app/*.css - app/*.html - app/*.js - app/*.js.map - app/converter/*.js - app/converter/*.js.map - node_modules/@angular/ - node_modules/core-js/client/shim.js - node_modules/zone.js/dist/zone.js - node_modules/reflect-metadata/Reflect.js - node_modules/rxjs/ - node_modules/systemjs/dist/system.src.js - node_modules/utf8/utf8.js - node_modules/quoted-printable/quoted-printable.js - node_modules/punycode/punycode.js - abeezee-regular.woff - freemono.eot - freemono.svg - freemono.ttf - freemono.woff - index.html - package.json - systemjs.config.js expire_in: 30 min cleanup_build_job: stage: cleanup_build script: - rm -rf node_modules - rm -rf typings when: on_failure develop: stage: deploy <<: *run_deploy environment: develop except: - tags - master - develop variables: ENVIRON: develop TARGET: $WWW_DEPLOY_ROOT_DEVELOP staging: stage: deploy <<: *run_deploy environment: staging only: - develop variables: ENVIRON: staging TARGET: $WWW_DEPLOY_ROOT_STAGING 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