-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
35 lines (35 loc) · 996 Bytes
/
.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
language: node_js
node_js:
- "10.12.0"
# Travis-CI Caching
cache:
directories:
- node_modules
before_script:
- git config user.name "${U_NAME}"
- git config user.email "${U_EMAIL}"
- git remote set-url origin https://${GH_TOKEN}@${GH_REF}
script:
- npm run build
- npm run clean
- npm run deploy
after_success:
- git remote set-url origin https://${GH_REF}
# - cd ./dist
# - git init
# - git config user.name "${U_NAME}"
# - git config user.email "${U_EMAIL}"
# - git add .
# - git commit -m "Update GP"
# - git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:${P_BRANCH}
# - ."./travis/deploy_pr_gae.sh"
# - export LH_MIN_PASS_SCORE=96
# - export LH_TEST_URL=https://your.staging.server.com/
# - node travis/runlighthouse.js $LH_TEST_URL $LH_MIN_PASS_SCORE
#指定分支,只有指定的分支提交时才会运行脚本
branches:
only:
- master
# env:
# global:
# 我将其添加到了travis-ci的环境变量中