forked from neherlab/covid19_scenarios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (43 loc) · 983 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
53
version: ~> 1.0
os: linux
dist: bionic
branches:
only:
- master
- release
language: node_js
cache: false
# yarn: true
# directories:
# - node_modules
install:
- yarn install --frozen-lockfile
before_script:
- cp .env.example .env
script:
- yarn test
before_deploy:
- yarn prod
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|release)$
after_deploy:
- yarn global add [email protected]
- >
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,release'