Skip to content

Commit 1a2006e

Browse files
committed
test ci stages
1 parent e36114d commit 1a2006e

File tree

1 file changed

+33
-15
lines changed

1 file changed

+33
-15
lines changed

.travis.yml

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,41 @@ cache:
99
install:
1010
- npm install
1111

12-
script:
13-
- npm run build
12+
stages:
13+
- lint
14+
- name: gh-pages
15+
if: branch = master
16+
- name: release
17+
if: branch = master
1418

15-
after_script:
16-
- cd ./example-dist
17-
- git init
18-
- git remote add origin "https://${GH_TOKEN}@${GH_REF}"
19-
- git checkout -b gh-pages
20-
- git config user.name "leezng"
21-
- git config user.email "leezng@163.com"
22-
- git add .
23-
- git commit -m "update example page"
24-
- git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" gh-pages:gh-pages
19+
jobs:
20+
include:
21+
- stage: lint
22+
script: npm run lint
23+
- stage: gh-pages
24+
script: npm run build
25+
after_script:
26+
- cd ./example-dist
27+
- git init
28+
- git remote add origin "https://${GH_TOKEN}@${GH_REF}"
29+
- git checkout -b gh-pages
30+
- git config user.name "leezng"
31+
- git config user.email "leezng@163.com"
32+
- git add .
33+
- git commit -m "update example page"
34+
- git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" gh-pages:gh-pages
35+
- stage: release
36+
script: echo "Deploying to GitHub releases ..."
37+
deploy:
38+
provider: releases
39+
api_key: ${GH_TOKEN}
40+
skip_cleanup: true
41+
on:
42+
tags: true
2543

26-
branches:
27-
only:
28-
- dev
44+
# branches:
45+
# only:
46+
# - dev
2947

3048
env:
3149
global:

0 commit comments

Comments
 (0)