-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (28 loc) · 1.04 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
---
sudo: required
dist: trusty
language: node_js
node_js:
- "lts/*"
before_install:
# set up awscli packages
- pip install --user awscli
cache:
directories:
- node_modules
script:
# - yarn test
- yarn build
deploy:
provider: s3
access_key_id: $ACCESS_KEY
secret_access_key: $SECRET_KEY
bucket: clementdungler.com
skip_cleanup: true
region: eu-west-2
local_dir: build
after_deploy:
- aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"
- aws s3 sync build s3://clementdungler.com --delete --cache-control max-age=31536000,public
- aws s3 cp s3://clementdungler.com/service-worker.js s3://clementdungler.com/service-worker.js --metadata-directive REPLACE --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type application/javascript --acl public-read
- aws s3 cp s3://clementdungler.com/index.html s3://clementdungler.com/index.html --metadata-directive REPLACE --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html --acl public-read