Skip to content

Commit

Permalink
fix: deploy cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
kcwww committed Apr 20, 2024
1 parent ffa3300 commit 9399f0a
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/tempFrontDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,25 @@ jobs:

- name: Upload to S3
env:
BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME}}
BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
run: |
aws s3 sync \
./front/dist s3://$BUCKET_NAME --delete \
aws s3 sync ./front/dist s3://$BUCKET_NAME --exclude '*' --include '*.js.gz' --content-encoding 'gzip' --content-type 'application/javascript' --acl 'public-read' \
aws s3 sync ./front/dist s3://$BUCKET_NAME --exclude '*' --include '*.svg.gz' --content-encoding 'gzip' --content-type 'image/svg+xml' --acl 'public-read' \
aws s3 sync ./front/dist s3://$BUCKET_NAME --exclude '*' --include '*.ico.gz' --content-encoding 'gzip' --content-type 'image/x-icon' --acl 'public-read' \
aws s3 sync ./front/dist s3://$BUCKET_NAME --exclude '*' --include '*.ttf.gz' --content-encoding 'gzip' --content-type 'font/ttf' --acl 'public-read' \
# Upload Gzip compressed JavaScript files
aws s3 sync ./front/dist s3://$BUCKET_NAME --exclude '*' --include '*.js.gz' --content-encoding 'gzip' --content-type 'application/javascript' --acl 'public-read'
# Upload Gzip compressed SVG files
aws s3 sync ./front/dist s3://$BUCKET_NAME --exclude '*' --include '*.svg.gz' --content-encoding 'gzip' --content-type 'image/svg+xml' --acl 'public-read'
# Upload Gzip compressed ICO files
aws s3 sync ./front/dist s3://$BUCKET_NAME --exclude '*' --include '*.ico.gz' --content-encoding 'gzip' --content-type 'image/x-icon' --acl 'public-read'
# Upload Gzip compressed TTF files
aws s3 sync ./front/dist s3://$BUCKET_NAME --exclude '*' --include '*.ttf.gz' --content-encoding 'gzip' --content-type 'font/ttf' --acl 'public-read'
# Upload Gzip compressed MP3 files
aws s3 sync ./front/dist s3://$BUCKET_NAME --exclude '*' --include '*.mp3.gz' --content-encoding 'gzip' --content-type 'audio/mpeg' --acl 'public-read'
- name: CloudFront Invalidation
env:
CLOUD_FRONT_ID: ${{ secrets.AWS_CLOUDFRONT_ID}}
Expand Down

0 comments on commit 9399f0a

Please sign in to comment.