-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.travis.yml
43 lines (43 loc) · 1016 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
36
37
38
39
40
41
42
43
language: node_js
language: python
python:
- "3.6"
branches:
only:
- stage
- master
git:
submodules: false
before_install:
# 让 travis ci 可以使用 git submodule,这要求 git submodule 的格式必须是 https 的
- echo -e "machine github.com\n login $CI_USER_TOKEN" >> ~/.netrc
- git submodule update --init --recursive
before_script:
- yarn install
cache:
yarn: true
directories:
- node_modules
script:
- ./preDeploy.sh
defaults: &defaults
skip-cleanup: true
github-token: $CI_USER_TOKEN
deploy:
# swift.gg 是部署在 aliyun 的网站
- <<: *defaults
provider: script
script: node deployMaster.js
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^master$
- <<: *defaults
# pages.swift.gg 是部署在 github.io 的网站
provider: pages
local-dir: public
keep-history: true
repo: SwiftGGTeam/SwiftGGTeam.github.io
target-branch: master
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^stage$