We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ecc911 commit 9b18d53Copy full SHA for 9b18d53
1 file changed
.github/workflows/deploy.yml
@@ -58,6 +58,19 @@ jobs:
58
59
- name: Invalidate CloudFront cache
60
run: |
61
- aws cloudfront create-invalidation \
+ set +e
62
+ OUTPUT=$(aws cloudfront create-invalidation \
63
--distribution-id E2WMIF8KN88WPK \
- --paths "/${{ steps.version.outputs.version }}/website/*"
64
+ --paths "/${{ steps.version.outputs.version }}/website/*" 2>&1)
65
+ STATUS=$?
66
+ set -e
67
+
68
+ if [ $STATUS -eq 0 ]; then
69
+ echo "$OUTPUT"
70
+ elif echo "$OUTPUT" | grep -q "AccessDenied"; then
71
+ echo "Warning: CloudFront invalidation skipped due to missing permissions (cloudfront:CreateInvalidation)."
72
73
+ else
74
75
+ exit $STATUS
76
+ fi
0 commit comments