Skip to content

Commit 03e0dcf

Browse files
committed
Try out travis staged build
1 parent 5321534 commit 03e0dcf

File tree

1 file changed

+41
-12
lines changed

1 file changed

+41
-12
lines changed

.travis.yml

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,44 @@
1-
branches:
2-
only:
3-
- master
4-
- develop
1+
sudo: required
52
language: node_js
63
node_js:
74
- "8"
8-
sudo: required
9-
install:
10-
- yarn
11-
- sudo pip install proselint
12-
before_script:
13-
- source ./src/scripts/env.sh
14-
script:
15-
- bash ./src/scripts/deploy.sh
5+
6+
cache:
7+
yarn: true
8+
pip: true
9+
directories:
10+
- ~/.proselint
11+
12+
stages:
13+
- lint
14+
- build
15+
- post-build
16+
17+
jobs:
18+
include:
19+
- stage: lint
20+
name: Linting
21+
before_install: npm install --global yarn
22+
install: yarn
23+
script: npm run lint
24+
cache:
25+
directories:
26+
- node_modules
27+
28+
- stage: build
29+
name: Build
30+
before_script:
31+
- source ./src/scripts/env.sh
32+
script: npm run build
33+
cache:
34+
directories:
35+
- dist
36+
37+
- stage: post-build
38+
name: Deploy
39+
if: branch = master
40+
script: bash ./src/scripts/deploy.sh
41+
42+
- stage: post-build
43+
name: Link check
44+
script: npm run linkcheck

0 commit comments

Comments
 (0)