The cloudfront_invalidate
GitHub action creates an invalidation request for an AWS CloudFront distribution. This is typically performed after new content is pushed to the CloudFront origin (S3, ALB, etc.) and you wish to have that new content updated in the CDN caches right away.
- uses: clowdhaus/aws-github-actions/cloudfront_invalidate@main
with:
# The CloudFront distribution ID
# Required: true
distribution-id: ''
# A value that you specify to uniquely identify an invalidation request. CloudFront uses the
# value to prevent you from accidentally resubmitting an identical request. Whenever you
# create a new invalidation request, you must specify a new value for `caller-reference`
# and change other values in the request as applicable.
# Default: git SHA that triggered the workflow
caller-reference: ''
# Path patrerns that contains information about the objects that you want to invalidate.
# For more information, see
# https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html
# Note: Use the yaml mutiline pipe | to specify multiple paths, one on each line
# Default: '/*' (invalidates entire distribution)
paths: ''
- uses: clowdhaus/aws-github-actions/cloudfront_invalidate@main
with:
distribution-id: E323PSTTFMI4A7
- uses: clowdhaus/aws-github-actions/cloudfront_invalidate@main
with:
distribution-id: E323PSTTFMI4A7
paths: |
/index.html
/error.http
/dist/*