-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (62 loc) · 1.51 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
language: node_js
env:
global:
- GitHub_REF: github.com/LLLgoyour/LUI.git
- Npm_Email: [email protected]
# Install dependence
install:
- npm install
- npm install -g codecov
# Cache the node_modules folder and don't need to download and install all npm packages every time.
# cache:
# directories:
# - node_modules
# Specify the node version.
node_js:
- "11"
- "10"
branches:
only:
- /.*/
stages:
# - test
- name: build doc
if: branch = Version-0
- deploy
jobs:
include:
- stage: test
script:
- npm test
- codecov
- stage: build doc
if: branch = Version-0
script:
- npm run docs:build
- cd docs
- git init
- git add -A
- git commit -m "docs:update docs"
- git push --force --quiet "https://${GitHub_TOKEN}@${GitHub_REF}" Version-0:Version-0
- stage: deploy
script:
- npm run prod
before_deploy:
- npm pack
deploy:
provider: npm
email: "$NPM_EMAIL"
api_key: "$NPM_TOKEN"
skip_cleanup: true
on:
tags: true
all_branches: true
after_success:
- bash <(curl -s https://codecov.io/bash)
# Configure to send notifications when the build fails. https://docs.travis-ci.com/user/notifications
notifications:
webhooks:
urls:
- https://www.travisbuddy.com/
on_success: never # Successful build does not send mail.
on_failure: always # Build failure always sends a message.