forked from blockkeeper/blockkeeper-frontend-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
34 lines (31 loc) · 1.07 KB
/
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
31
32
33
34
version: 0.1
phases:
install:
commands:
- echo Installing dependencies...
- sudo apt-get update && apt-get -y install apt-transport-https
- echo Installing Yarn...
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- sudo apt-get update && sudo apt-get -y install yarn
pre_build:
commands:
- echo Installing NPM dependencies via yarn...
- yarn install
build:
commands:
- echo Build started
- yarn build
post_build:
commands:
- echo Build completed, sync to s3 bucket now
#- aws s3 sync --delete build/ "s3://app.blockkeeper.io"
#service worker problems
- aws s3 sync build/ "s3://app.blockkeeper.io" --cache-control max-age=0
#- echo Start Cloudfront invalidation
#- aws configure set preview.cloudfront true
#- aws cloudfront create-invalidation --distribution-id E2ML292P0CE01 --paths /*
- echo Done
artifacts:
files:
- build/**/*