forked from MechanicalRock/tech-radar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
30 lines (26 loc) · 951 Bytes
/
buildspec.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
version: 0.2
env:
variables:
CI: true
REGION: ap-southeast-2
WEBSITE_BUCKET: s3://techradarstaticsitestack-staticsitebucket8958ee3f-6fmeuqatxkuq/
phases:
pre_build:
commands:
- cd aws
- npm i
- npm test -- -u
- npm run deploy
build:
commands:
- cd ../app
- npm i
- npm test -- --coverage
- npm run build
post_build:
commands:
# Website with hashed static assets caching strategy
- aws s3 cp ./build/ $WEBSITE_BUCKET --exclude "index.html" --exclude "technologies.json" --exclude "service-worker.js" --recursive --acl private --cache-control max-age=31536000,public
- aws s3 cp ./build/index.html $WEBSITE_BUCKET --acl private --cache-control no-cache
- aws s3 cp ./build/technologies.json $WEBSITE_BUCKET --acl private --cache-control no-cache
- aws s3 cp ./build/service-worker.js $WEBSITE_BUCKET --acl private --cache-control no-cache