stages: - build - deploy build-dev: image: node:10.15 stage: build interruptible: true cache: paths: - node_modules/ only: - develop environment: name: build script: - npm install - npm run build build-publish: image: node:10.15 stage: build interruptible: true environment: name: publish cache: paths: - node_modules/ only: - tags script: - echo $NPM_TOKEN | base64 -d > .npmrc - git config --global user.email "gitlab@gitlab.airvertdevtest.com" - git config --global user.name "Mr.Gitlab" - echo ${CI_COMMIT_TAG:1} - npm version ${CI_COMMIT_TAG:1} --no-git-tag-version - npm install - mkdir -p ./dist/static/images - npm run styleguide:build - npm run build - npm publish artifacts: paths: - ./styleguide when: on_success expire_in: 1 hrs hosting-deploy: image: node:10.15 stage: deploy interruptible: true only: - tags script: - npm install -g firebase-tools - firebase deploy --token "$FIREBASE_TOKEN"