From 5062a2ef1f6e53a20181f7ce58b250d632a8d12a Mon Sep 17 00:00:00 2001 From: alexander-schefe Date: Mon, 11 Aug 2025 13:08:49 +0200 Subject: [PATCH] fix: made aws cache invalidation an optional step --- .github/workflows/reusable-deploy-job.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/reusable-deploy-job.yml b/.github/workflows/reusable-deploy-job.yml index 87b64800..50c0d537 100644 --- a/.github/workflows/reusable-deploy-job.yml +++ b/.github/workflows/reusable-deploy-job.yml @@ -94,17 +94,9 @@ jobs: - name: Deploy Backends run: serverless deploy --stage ${{ inputs.target }} - - name: Get CloudFront Distribution ID - id: get_dist_id - run: | - BUCKET_NAME="${{ secrets.COMPANY_ABBREVIATION }}-lara-frontend-${{ inputs.target }}" - DIST_ID=$(aws cloudfront list-distributions \ - --query "DistributionList.Items[?Origins.Items[?DomainName=='${BUCKET_NAME}.s3.amazonaws.com']].Id" \ - --output text) - echo "distribution_id=$DIST_ID" >> $GITHUB_OUTPUT - - name: Invalidate CloudFront cache + continue-on-error: true run: | aws cloudfront create-invalidation \ - --distribution-id ${{ steps.get_dist_id.outputs.distribution_id }} \ + --distribution-id ${{ secrets.AWS_FRONTEND_DISTRIBUTION_ID }} \ --paths "/*"