From e955e8811363a8906408de0160373c21b47975aa Mon Sep 17 00:00:00 2001 From: Gaurang Patel Date: Thu, 12 Sep 2024 23:32:05 +1000 Subject: [PATCH] Added Cloudfront cache invalidation post deploy as well as added Google analytics --- .github/workflows/deploy.yml | 3 +++ src/index.html | 27 ++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 43cbade..154ec7f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,3 +17,6 @@ jobs: - name: Sync files to S3 bucket run: | aws s3 cp src s3://${{vars.AWS_BUCKET_NAME}}/ --recursive + - name: Invalidate CloudFront cache + run: | + aws cloudfront create-invalidation --distribution-id ${{vars.AWS_CLOUDFRONT_ID}} --paths "/*" diff --git a/src/index.html b/src/index.html index d58d570..bd3ddab 100644 --- a/src/index.html +++ b/src/index.html @@ -18,11 +18,36 @@ // Remove rocket bounce animation after certain time setTimeout(() => { document.getElementById("rocket-icon").classList.remove("fa-bounce"); - }, 4000); + }, 3000); + + + + + +