-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec-node.yml
23 lines (23 loc) · 933 Bytes
/
buildspec-node.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
version: 0.2
phases:
install:
commands:
- apt-get update
- apt-get -y upgrade
- apt-get install zip unzip -y
- cd client
- aws apigateway get-sdk --rest-api-id ${REST_API} --stage-name beta --sdk-type javascript sdk.zip
- npm install
- echo "{\"region\":\"${AWS_DEFAULT_REGION}\",\"access_key\":\"${TRANSCRIBER_KEY}\",\"secret\":\"${TRANSCRIBER_SECRET}\"}" > assets/js/credentials.json
build:
commands:
- unzip sdk.zip
- rm sdk.zip
- npm run-script build
- aws s3 cp index.html s3://${CLIENT} > deploymentResult.txt
- aws s3 cp ./dist s3://${CLIENT}/dist --recursive > deploymentResult.txt
- aws s3 cp apiGateway-js-sdk s3://${CLIENT}/assets/js/apiGateway-js-sdk --recursive > deploymentResult.txt
- aws s3 cp ./assets/css s3://${CLIENT}/assets/css --recursive > deploymentResult.txt
artifacts:
files:
- client/deploymentResult.txt