-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
36 lines (28 loc) · 1.04 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
35
36
---
version: 0.1
phases:
install:
commands:
- echo Installing as $(whoami)
- npm install
- $(npm bin)/bower install --allow-root
build:
commands:
- $(npm bin)/gulp build
- $(npm bin)/gulp test
- $(npm bin)/gulp document
post_build:
commands:
# Update Lambdas
- aws lambda update-function-code --function-name "${REKT_CREATE_REVIEW_LAMBDA_ARN}" --zip-file "fileb://$(pwd)/dist/aws/lambda-api-gateway.zip"
- aws lambda update-function-code --function-name "${REKT_GET_REVIEW_LAMBDA_ARN}" --zip-file "fileb://$(pwd)/dist/aws/lambda-api-gateway.zip"
# Update Api
- aws apigateway put-rest-api --fail-on-warnings --mode overwrite --rest-api-id "${REKT_API_ID}" --body "file://$(pwd)/dist/site/swagger.yml"
# Deploy Api
- aws apigateway create-deployment --rest-api-id "${REKT_API_ID}" --stage-name "${REKT_API_GATEWAY_STAGE}"
# Update Website
- aws s3 sync dist/site "s3://${REKT_WEBSITE_BUCKET}"
artifacts:
discard-paths: no
files:
- dist/**/*