2019-01-17 17:07:37 +00:00
|
|
|
language: node_js
|
|
|
|
node_js:
|
|
|
|
- "8"
|
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- "node_modules"
|
|
|
|
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
2019-02-22 09:18:14 +00:00
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- stage: test
|
|
|
|
script:
|
|
|
|
- npm run lint:nofix
|
|
|
|
- npm run test:unit
|
|
|
|
- npm install
|
|
|
|
- npm run build
|
2019-01-17 17:07:37 +00:00
|
|
|
|
2019-02-22 23:25:19 +00:00
|
|
|
- stage: deploy
|
2019-02-23 00:24:13 +00:00
|
|
|
before_script: echo VUE_APP_ALERTA_ENDPOINT=https://alerta-api.herokuapp.com > .env
|
2019-02-22 23:25:19 +00:00
|
|
|
script: npm run build
|
2019-02-22 09:18:14 +00:00
|
|
|
deploy:
|
|
|
|
- provider: pages
|
|
|
|
skip-cleanup: true
|
|
|
|
github-token: $GITHUB_TOKEN
|
|
|
|
target-branch: gh-pages
|
|
|
|
local-dir: dist
|
|
|
|
on:
|
|
|
|
branch: master
|
2019-03-06 22:20:30 +00:00
|
|
|
|
|
|
|
- stage: release
|
|
|
|
deploy:
|
|
|
|
- provider: releases
|
|
|
|
skip-cleanup: true
|
|
|
|
github-token: $GITHUB_TOKEN
|
|
|
|
file_glob: true
|
|
|
|
file: dist/**/*
|
|
|
|
on:
|
|
|
|
tags: true
|
|
|
|
|