diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index de3d6aec4..72649870d 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -47,6 +47,8 @@ jobs: build-backend: runs-on: ubuntu-latest environment: staging + outputs: + image_backend: ${{ steps.build-backend.outputs.image_backend }} steps: - uses: actions/checkout@v4 @@ -259,6 +261,15 @@ jobs: echo "bucket=$(terragrunt output bucket_name | tr -d '"')" >> $GITHUB_OUTPUT echo "distribution=$(terragrunt output cloudfront_id)" >> $GITHUB_OUTPUT + - name: download artifact + uses: actions/download-artifact@v4 + with: + name: + frontend + + - name: Unzip Artifact + run: unzip frontend.zip + - name: Deploy frontend to S3 run: aws s3 sync frontend/dist "s3://${{ steps.get-frontend-resources.outputs.bucket }}" @@ -316,12 +327,6 @@ jobs: sudo chmod +x /bin/terragrunt terragrunt -v - - name: download ecr tag - uses: actions/download-artifact@v4 - with: - name: - ecr_tag - # - name: create release tag # id: create-release-tag # run: echo "tag_name=r-$(printf %04d $GITHUB_RUN_NUMBER)" >> $GITHUB_OUTPUT @@ -357,7 +362,7 @@ jobs: run: | terragrunt init -upgrade terragrunt validate - terragrunt plan -var 'image=${{ steps.create-release-tag.outputs.tag_name }}' -out tfplan + terragrunt plan -var 'image=${{ needs.build-backend.outputs.image_backend }}' -out tfplan terragrunt apply tfplan create-release: @@ -384,7 +389,6 @@ jobs: with: name: ecr_tag - - run: ls - name: create release tag id: create-release-tag