diff --git a/.github/workflows/CDN_Front_Deploy.yml b/.github/workflows/CDN_Front_Deploy.yml index 9b2087b..2a36280 100644 --- a/.github/workflows/CDN_Front_Deploy.yml +++ b/.github/workflows/CDN_Front_Deploy.yml @@ -45,13 +45,13 @@ jobs: env: BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }} run: | - aws s3 sync ./front/dist s3://$BUCKET_NAME --delete + # Upload all files first, then apply specific settings for compressed files aws s3 sync ./front/dist s3://$BUCKET_NAME --exclude '*' --include '*.js.gz' --content-encoding 'gzip' --content-type 'application/javascript' aws s3 sync ./front/dist s3://$BUCKET_NAME --exclude '*' --include '*.svg.gz' --content-encoding 'gzip' --content-type 'image/svg+xml' aws s3 sync ./front/dist s3://$BUCKET_NAME --exclude '*' --include '*.ico.gz' --content-encoding 'gzip' --content-type 'image/x-icon' aws s3 sync ./front/dist s3://$BUCKET_NAME --exclude '*' --include '*.ttf.gz' --content-encoding 'gzip' --content-type 'font/ttf' - aws s3 sync ./front/dist s3://$BUCKET_NAME --exclude '*' --include '*.woff.gz' --content-encoding 'gzip' --content-type 'font/woff' aws s3 sync ./front/dist s3://$BUCKET_NAME --exclude '*' --include '*.mp3.gz' --content-encoding 'gzip' --content-type 'audio/mpeg' + aws s3 sync ./front/dist s3://$BUCKET_NAME --delete - name: CloudFront Invalidation env: