A simple GitHub action to sync with S3 and trigger Cloudfront invalidation
Required AWS credentials to use for CLI. You should use the GitHub secrets for this.
Required AWS credentials to use for CLI. You should use the GitHub secrets for this.
Required AWS credentials to use for CLI. You may use the GitHub secrets for this.
Optional true/false choice to decide whether to trigger invalidation.
Optional/Required Only required when CLOUDFRONT_INVALIDATE is set to true.
- name: Sync s3 and invalidate cloudfront cache
uses: imehedi/action-s3-cloudfront@v1
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_REGION: 'us-east-1'
SOURCE_DIR: 'public'
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
CLOUDFRONT_INVALIDATE: true
CF_PATHS: '/*'