-
Notifications
You must be signed in to change notification settings - Fork 352
/
.travis.yml
52 lines (42 loc) · 1012 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
44
45
46
47
48
49
50
51
52
version: ~> 1.0
os: linux
dist: bionic
branches:
only:
- master
- staging
- release
language: node_js
cache: false
install:
- yarn install --frozen-lockfile
before_script:
- cp .env.example .env
script:
- yarn schema:totypes
- yarn eslint --max-warnings=0
before_deploy:
- yarn prod:build
deploy:
- provider: s3
edge: true
detect_encoding: false
dot_match: true
local_dir: .build/production/web
region: $AWS_DEFAULT_REGION
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $AWS_S3_BUCKET
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^(master|staging|release)$
after_deploy:
- yarn global add travis-ci-cloudfront-invalidation@1.1.0
- >
travis-ci-cloudfront-invalidation \
-b $TRAVIS_BRANCH -p $TRAVIS_PULL_REQUEST \
-a $AWS_ACCESS_KEY_ID \
-s $AWS_SECRET_ACCESS_KEY \
-c $AWS_CLOUDFRONT_DISTRIBUTION_ID \
-i '/*' \
-o 'master,staging,release'