mirror of
https://github.com/alerta/alerta-webui.git
synced 2025-03-17 22:12:37 +00:00
44 lines
849 B
YAML
44 lines
849 B
YAML
language: node_js
|
|
node_js:
|
|
- "8"
|
|
|
|
cache:
|
|
directories:
|
|
- "node_modules"
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
|
|
script:
|
|
- npm run lint:nofix
|
|
- npm run test:unit
|
|
- npm install
|
|
- npm run build
|
|
|
|
before_deploy:
|
|
- cd dist; zip ../${TRAVIS_TAG}.zip -r *; cd ..
|
|
|
|
jobs:
|
|
include:
|
|
- stage: deploy
|
|
before_script: echo VUE_APP_ALERTA_ENDPOINT=https://alerta-api.herokuapp.com > .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
|
|
deploy:
|
|
- provider: releases
|
|
skip-cleanup: true
|
|
github-token: $GITHUB_TOKEN
|
|
file:
|
|
- dist/${TRAVIS_TAG}.zip
|
|
on:
|
|
tags: true
|