forked from ReedD/dadoune.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
22 lines (22 loc) · 839 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
version: 0.1
phases:
install:
commands:
# Install nodejs https://nodejs.org/en/download/package-manager/
- curl -sL https://deb.nodesource.com/setup_7.x | bash -
- apt-get install -y nodejs
# Install yarn natively https://yarnpkg.com/en/docs/install#linux-tab
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
- apt-get update
- apt-get install -y yarn
pre_build:
commands:
- yarn install --production
build:
commands:
- yarn run build
post_build:
commands:
- aws s3 sync --delete --exclude assets/* build/ "s3://${BUCKET_NAME}"
- aws s3 sync --delete --cache-control "max-age=31536000" build/assets "s3://${BUCKET_NAME}/assets"