Replace CloudFront invalidation with API Gateway endpoint

This commit is contained in:
Evgeniy Antonyuk
2025-12-18 12:39:58 +00:00
parent c2074bbff6
commit cd4d5b180e

View File

@ -119,7 +119,7 @@ jobs:
env: env:
URI: ${{steps.tag-dir.outputs.URI}} URI: ${{steps.tag-dir.outputs.URI}}
run: | run: |
aws cloudfront create-invalidation \ API_STATUS=$(aws apigateway test-invoke-method --rest-api-id ${{ secrets.AWS_REST_API_ID }} --resource-id "${{ secrets.AWS_RESOURCE_ID }}" \
--distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }} \ --http-method PUT --path-with-query-string "/prod/download-oo-com" --body "$(jq -c -n '.paths = $ARGS.positional' --args "${URI}/*")" \
--paths \ --region us-east-1 --query 'status' --output text || :)
"${URI}/*" echo "API Gateway test-invoke status: ${API_STATUS:-<failed>}"