-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.yaml
More file actions
27 lines (23 loc) · 830 Bytes
/
Copy pathdeploy.yaml
File metadata and controls
27 lines (23 loc) · 830 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
version: 0.2
phases:
install:
runtime-versions:
nodejs: 12
pre_build:
commands:
- npm install --g yarn
- yarn global add gulp@4.0.2
- yarn add --dev gulp@4.0.2 gulp-awspublish@5.0.1 gulp-cloudfront-invalidate-aws-publish@1.0.0 concurrent-transform@1.0.0
build:
commands:
- TEMP_ROLE=$(aws sts assume-role --role-arn $DEPLOYMENT_ROLE_ARN --role-session-name deploy)
- export TEMP_ROLE
- export AWS_ACCESS_KEY_ID=$(echo "${TEMP_ROLE}" | jq -r '.Credentials.AccessKeyId')
- export AWS_SECRET_ACCESS_KEY=$(echo "${TEMP_ROLE}" | jq -r '.Credentials.SecretAccessKey')
- export AWS_SESSION_TOKEN=$(echo "${TEMP_ROLE}" | jq -r '.Credentials.SessionToken')
- yarn install
- yarn generate
- gulp deploy
cache:
paths:
- '/node_modules/**/*'