Skip to content

Commit d2ffef7

Browse files
committed
add back cloudfront invalidation
1 parent 1bdf4bb commit d2ffef7

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,12 @@ jobs:
111111
env:
112112
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
113113
run: just site-deploy
114+
115+
- name: Invalidate CloudFront cache
116+
uses: chetan/invalidate-cloudfront-action@v2
117+
env:
118+
DISTRIBUTION: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
119+
PATHS: '/index.html /page/* /feed.rss'
120+
AWS_REGION: 'us-east-1'
121+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
122+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

SPEC.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ The implementation is considered complete when:
233233
- Secret values are synchronized with Railway through `railway variable set KEY --stdin` so they are not exposed on the command line during GitHub Actions runs.
234234
- Inline shell in the deployment and validation workflows is minimized in favor of reusable repo-root `just` recipes so the same deployment task entry points can be reused locally and in CI.
235235
- The site deploy job continues to build the SwiftWASM app and sync `Output/` to S3 using a fixed `BYTESIZED_CAFE_API_URL`.
236+
- After the S3 sync completes, the site deploy job invalidates the production CloudFront distribution with `CLOUDFRONT_DISTRIBUTION_ID` for `/index.html`, `/page/*`, and `/feed.rss`.
236237
- The site deploy sync no longer owns generated images, because they live in a separate generated-images bucket from the static site bucket.
237238

238239
## 11. Local Development

0 commit comments

Comments
 (0)