forked from alerta/alerta-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
52 lines (48 loc) · 1.02 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
language: node_js
node_js:
- '8'
cache:
directories:
- node_modules
install:
- npm install
stages:
- test
- name: deploy
if: type != pull_request AND branch = master
- release
jobs:
include:
- stage: test
script:
- npm run lint:nofix
- npm run test:unit
- stage: deploy
before_script:
- echo VUE_APP_ALERTA_ENDPOINT=https://alerta-api.herokuapp.com > .env
- echo VUE_APP_TRACKING_ID=UA-44644195-7 >> .env
script: npm run build
deploy:
- provider: pages
skip-cleanup: true
github-token: "$GITHUB_TOKEN"
target-branch: gh-pages
local-dir: dist
on:
branch: master
- stage: release
before_script:
- echo VUE_APP_DEBUG=1 > .env
script: npm run build
before_deploy:
- zip alerta-webui.zip -r dist/*
- tar cvfz alerta-webui.tar.gz dist/*
deploy:
- provider: releases
skip-cleanup: true
api_key: "$GITHUB_TOKEN"
file:
- alerta-webui.zip
- alerta-webui.tar.gz
on:
tags: true