@@ -14,25 +14,32 @@ jobs:
1414 uses : actions/checkout@v4
1515
1616 - name : Deploy Preview
17- uses : LocalStack/setup-localstack/preview@main
17+ uses : LocalStack/setup-localstack@v0.2.0
18+ env :
19+ LOCALSTACK_API_KEY : ${{ secrets.LOCALSTACK_API_KEY }}
1820 with :
1921 github-token : ${{ secrets.GITHUB_TOKEN }}
20- localstack-api-key : ${{ secrets.LOCALSTACK_API_KEY }}
22+ state-backend : ephemeral
23+ state-action : start
24+ include-preview : ' true'
25+ install-awslocal : ' true'
26+ # Multi line commands are folding for some reason, so we enforce new lines
27+ # For more predictable usage, use script files
2128 preview-cmd : |
22- npm install -g aws-cdk-local aws-cdk
23- pip install awscli-local[ver1]
24- make build
25- make bootstrap
26- make deploy
27- make prepare -frontend-local
28- make build -frontend
29- make bootstrap -frontend
30- make deploy-frontend
31- distributionId=$(awslocal cloudfront list-distributions | jq -r '.DistributionList.Items[0].Id')
32- echo "PREVIEW_URL=$AWS_ENDPOINT_URL/cloudfront/$distributionId/" >> $GITHUB_ENV
29+ npm install -g aws-cdk-local aws-cdk;
30+ make build;
31+ make bootstrap;
32+ make deploy;
33+ make prepare-frontend-local;
34+ make build -frontend;
35+ make bootstrap -frontend;
36+ make deploy -frontend;
37+ distributionId=$(awslocal cloudfront list-distributions | jq -r '.DistributionList.Items[0].Id');
38+ echo \"PREVIEW_URL=$AWS_ENDPOINT_URL/ cloudfront/$distributionId/\" >> $GITHUB_ENV;
39+
3340
3441 - name : Finalize PR comment
35- uses : LocalStack/setup-localstack/finish@pass-url-to-finish-step
42+ uses : LocalStack/setup-localstack/finish@v0.2.0
3643 with :
3744 github-token : ${{ secrets.GITHUB_TOKEN }}
3845 include-preview : true
0 commit comments