0
0
Fork 0
mirror of https://github.com/alerta/alerta-webui.git synced 2025-03-16 21:43:29 +00:00
alerta_alerta-webui/.travis.yml
2019-05-03 11:32:41 +02:00

53 lines
1.1 KiB
YAML

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 BASE_URL=./ > .env
- 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