diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 4e4d24b..5d3e260 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v4 - name: Deploy Preview - uses: LocalStack/setup-localstack@v0.2.0 + uses: LocalStack/setup-localstack@fix_finish_comment env: LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} with: @@ -23,24 +23,18 @@ jobs: state-action: start include-preview: 'true' install-awslocal: 'true' + skip-ephemeral-stop: 'false' # Multi line commands are folding for some reason, so we enforce new lines # For more predictable usage, use script files preview-cmd: | - npm install -g aws-cdk-local aws-cdk; - make build; - make bootstrap; - make deploy; - make prepare-frontend-local; - make build-frontend; - make bootstrap-frontend; - make deploy-frontend; - distributionId=$(awslocal cloudfront list-distributions | jq -r '.DistributionList.Items[0].Id'); - echo \"PREVIEW_URL=$AWS_ENDPOINT_URL/cloudfront/$distributionId/\" >> $GITHUB_ENV; + npm install -g aws-cdk-local aws-cdk + make build + make bootstrap + make deploy + make prepare-frontend-local + make build-frontend + make bootstrap-frontend + make deploy-frontend + distributionId=$(awslocal cloudfront list-distributions | jq -r '.DistributionList.Items[0].Id') + echo "PREVIEW_URL=$AWS_ENDPOINT_URL/cloudfront/$distributionId/" >> $GITHUB_ENV - - - name: Finalize PR comment - uses: LocalStack/setup-localstack/finish@v0.2.0 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - include-preview: true - preview-url: ${{ env.PREVIEW_URL }}