-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
47 lines (41 loc) · 1.07 KB
/
.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
44
45
46
47
language: node_js
node_js:
- '12'
cache: npm
before_install:
# install codecov to send code
# coverage reports
- npm install codecov -g
jobs:
include:
- stage: test
script: npm run typecheck
- #
script: npm run lint
- # run codecov job only after
# coverage report is generated
script: npm test
after_script: codecov
- stage: build_and_deploy_next
if: branch = master
script: GATSBY_ACTIVE_ENV=next npm run build
deploy:
provider: surge
project: public/
domain: projectunicorn-next.surge.sh
skip_cleanup: true
on:
branch: master
- stage: build_and_deploy_tagged_release
if: tag IS present
before_script: if [[ ! -z "$PROD_URL" ]]; then echo "$PROD_URL" > static/CNAME; else false; fi
script: GATSBY_ACTIVE_ENV=release npm run build
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
target-branch: gh-pages
keep-history: true
local-dir: public/
on:
tags: true