Skip to content

Conversation

@TheRealBenForce
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings November 21, 2025 04:23
@TheRealBenForce TheRealBenForce merged commit 9171d73 into main Nov 21, 2025
3 checks passed
@TheRealBenForce TheRealBenForce deleted the invalidate-cloudfront branch November 21, 2025 04:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds CloudFront cache invalidation to the deployment workflow, ensuring that changes deployed to the main branch are immediately visible by invalidating the CloudFront distribution cache.

  • Adds a new workflow step to invalidate CloudFront distribution after S3 deployment
  • Invalidation only runs on the main branch to match production deployments
  • Uses the same AWS credentials pattern as the existing S3 deployment step

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- name: Invalidate CloudFront distribution on main branch
if: github.ref == 'refs/heads/main'
run: |
aws cloudfront create-invalidation --distribution-id E12E3K1OI02YXE --paths "/*"
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider storing the CloudFront distribution ID as a repository secret or environment variable instead of hardcoding it. This would improve security and maintainability, especially if the distribution ID needs to change or if you want to use different distributions for different environments.

Example:

run: |
  aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"
Suggested change
aws cloudfront create-invalidation --distribution-id E12E3K1OI02YXE --paths "/*"
aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant