mirror of
https://github.com/alerta/alerta-webui.git
synced 2025-03-16 21:43:29 +00:00
48 lines
946 B
YAML
48 lines
946 B
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 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
|
|
script: npm run build
|
|
before_deploy:
|
|
- zip alerta-web-beta.zip -r dist/*
|
|
- tar cvfz alerta-web-beta.tar.gz dist/*
|
|
deploy:
|
|
- provider: releases
|
|
skip-cleanup: true
|
|
api_key: "$GITHUB_TOKEN"
|
|
file:
|
|
- alerta-web-beta.zip
|
|
- alerta-web-beta.tar.gz
|
|
on:
|
|
tags: true
|