-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
40 lines (36 loc) · 843 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
language: node_js
node_js:
- "lts/*"
cache:
directories:
- "node_modules"
stages:
- lint
- lint-styles
- test
- name: deploy
if: branch = master
before_install:
- npm ci
jobs:
include:
- stage: lint
name: "Lint JS"
script:
- npm run lint
- stage: lint-styles
name: "Lint CSS"
script:
- npm run lint-styles
- stage: test
name: "Unit tests"
script:
- npm run test
- stage: deploy
name: "Production build & deploy"
script:
- export NODE_ENV=production
- npm run build
- cp netlify.toml build
- npm i -g netlify-cli
- netlify deploy --dir="./build" --prod --site=$NETLIFY_SITE_ID --auth=$NETLIFY_AUTH_TOKEN --message="CI/CD build"