File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 4848 dd-rum-client-token : ${{ secrets.DD_RUM_CLIENT_TOKEN }}
4949 dd-sample-rate : ${{ secrets.DD_SAMPLE_RATE }}
5050 DD_API_KEY : ${{ secrets.DD_API_KEY }}
51+ S3_STATIC_ASSETS_BUCKET_NAME : ${{ secrets.S3_STATIC_ASSETS_BUCKET_NAME }}
Original file line number Diff line number Diff line change 102102 DD_API_KEY :
103103 description : ' Datadog API key'
104104 required : true
105+ S3_STATIC_ASSETS_BUCKET_NAME :
106+ description : ' S3 domain style bucket name for static assets'
107+ required : true
105108
106109# used to configure IAM to trust Github's OIDC provider
107110permissions :
@@ -201,6 +204,16 @@ jobs:
201204 ENV_TYPE=${{ inputs.environment }}
202205 ENV_SITE_NAME=${{ inputs.environment-site-name }}
203206
207+ - name : Copy Static Assets from Docker Image and Push to S3
208+ env :
209+ S3_STATIC_ASSETS_BUCKET_NAME : ${{ secrets.S3_STATIC_ASSETS_BUCKET_NAME }}
210+ ECR_REPOSITORY : ${{ inputs.ecr-repository }}
211+ run : |
212+ mkdir -p /tmp/s3static
213+ chmod 777 /tmp/s3static
214+ docker run --rm -v /tmp/s3static:/tmp/s3static $ECR_REPOSITORY:$IMAGE_TAG cp -r ./dist/frontend/. /tmp/s3static
215+ aws s3 sync /tmp/s3static s3://$S3_STATIC_ASSETS_BUCKET_NAME
216+
204217 - name : Deploy Amazon ECS task definition
205218 uses : aws-actions/amazon-ecs-deploy-task-definition@df9643053eda01f169e64a0e60233aacca83799a
206219 with :
You can’t perform that action at this time.
0 commit comments