From 758847dd8cfe2e45599d4954815fb3d6df40e9e5 Mon Sep 17 00:00:00 2001 From: Jo Date: Thu, 6 Jun 2024 10:25:45 -0400 Subject: [PATCH] fix path issues in S3 upload --- .github/workflows/deploy-staging.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 380f45063..7747de9d3 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -176,8 +176,11 @@ jobs: - name: Deploy frontend to S3 run: | - aws s3 sync frontend/dist "s3://$(terragrunt output bucket_name | tr -d '"')" - aws cloudfront create-invalidation --distribution-id $(terragrunt output cloudfront_id) --paths "/*" + cd tofu/environments/stage/services/frontend-infra + bucket=terragrunt output bucket_name | tr -d '"' + cloudfront=terragrunt output cloudfront_id + aws s3 sync ../../../../../frontend/dist "s3://$bucket" + aws cloudfront create-invalidation --distribution-id $cloudfront --paths "/*" deploy-backend: