-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildspec.yml
More file actions
33 lines (30 loc) · 816 Bytes
/
Copy pathbuildspec.yml
File metadata and controls
33 lines (30 loc) · 816 Bytes
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
version: 0.2
phases:
install:
runtime-versions:
nodejs: latest
on-failure: ABORT
commands:
- n lts && node -v && npm -v
- npm ci
pre_build:
on-failure: ABORT
commands:
- npm run lint
build:
on-failure: ABORT
commands:
- npm run build
- zip -jmX ./dist/server.zip ./dist/server/** ./dist/app/manifest.json
post_build:
on-failure: ABORT
commands:
- aws lambda update-function-code --function-name ${FUNCTION_NAME} --zip-file fileb://./dist/server.zip
- aws lambda wait function-updated-v2 --function-name ${FUNCTION_NAME}
- aws s3 sync ./dist/app "s3://${BUCKET}" --delete --size-only --cache-control 'public, max-age=604800, immutable'
artifacts:
files:
- 'dist/**/*'
cache:
paths:
- 'node_modules/**/*'