Skip to content

Commit 8552848

Browse files
committed
ci: add new invalidation cdn cache step
1 parent 33203b8 commit 8552848

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/main.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,17 @@ jobs:
4848
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
4949
aws-region: ${{ vars.AWS_REGION }}
5050

51-
- name: Config AWS S3 sync static
52-
id: config-aws-s2-sync-static
51+
- name: Sync files to S3 static
52+
id: sync-files-to-s3-static
5353
run: |
5454
aws s3 sync ${{ env.SOURCE_FOLDER }} s3://${{ env.AWS_BUCKET_NAME_STATIC }} --delete
5555
56-
- name: Config AWS S3 sync CDN
57-
id: config-aws-s2-sync-cdn
56+
- name: Sync files to S3 CDN
57+
id: sync-files-to-s3-cdn
5858
run: |
5959
aws s3 sync ${{ env.SOURCE_FOLDER }} s3://${{ env.AWS_BUCKET_NAME_CDN }} --delete
60+
61+
- name: Invalidate CDN cache
62+
id: invalidate-cdn-cache
63+
run: |
64+
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }} --paths "/*"

0 commit comments

Comments
 (0)