1 | language: node_js
|
2 | node_js:
|
3 | - 10
|
4 | branches:
|
5 | only:
|
6 | - master
|
7 | cache:
|
8 | directories:
|
9 | - node_modules
|
10 | before_install:
|
11 | - export TZ='Asia/Xiamen'
|
12 | install:
|
13 | - npm install
|
14 | script:
|
15 | - npm run demo
|
16 | - npm run build
|
17 | after_success:
|
18 | - npm run test
|
19 | jobs:
|
20 | include:
|
21 | - stage: "gh-page"
|
22 | script: npm run demo
|
23 | deploy:
|
24 | provider: pages
|
25 | skip_cleanup: true
|
26 | keep_history: true
|
27 | github_token: $GITHUB_TOKEN
|
28 | local_dir: ./dist/
|
29 | target_branch: gh-pages
|
30 | verbose: true
|
31 | on:
|
32 | branch: master
|
33 | - stage: npm release
|
34 | node_js: "10"
|
35 | script: npm run build
|
36 | deploy:
|
37 | provider: npm
|
38 | email: "$EMAIL"
|
39 | api_key: "$NPM_TOKEN"
|
40 | skip_cleanup: true
|
41 | on:
|
42 | branch: master
|
43 |
|