Skip to content

Commit 2e85c74

Browse files
authored
chore: ensure files are uploaded with proper content encoding (#1254)
1 parent 4aadcef commit 2e85c74

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,13 @@ jobs:
399399
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_SECRET_ACCESS_KEY }}
400400
AWS_DEFAULT_REGION: auto
401401
run: |
402-
# Sync the deploy directory to the Cloudflare bucket - CRC32 is required for the checksum-algorithm on cloudflare (ref. https://community.cloudflare.com/t/an-error-occurred-internalerror-when-calling-the-putobject-operation/764905/8)
403-
aws s3 sync deploy/ s3://${{ secrets.CF_BUCKET_PREVIEW }}/${{ steps.build-plugin.outputs.BUCKET_PATH }} --endpoint-url ${{ secrets.CF_ENDPOINT }} --checksum-algorithm CRC32
402+
# Sync the deploy directory to the Cloudflare bucket with explicit content encoding and public-read ACL
403+
aws s3 sync deploy/ s3://${{ secrets.CF_BUCKET_PREVIEW }}/${{ steps.build-plugin.outputs.BUCKET_PATH }} \
404+
--endpoint-url ${{ secrets.CF_ENDPOINT }} \
405+
--checksum-algorithm CRC32 \
406+
--no-guess-mime-type \
407+
--content-encoding none \
408+
--acl public-read
404409
405410
- name: Upload Release Assets
406411
if: needs.release-please.outputs.releases_created == 'true'

.github/workflows/release-production.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@ jobs:
9999
AWS_DEFAULT_REGION: ${{ secrets.DO_SPACE_REGION }}
100100
AWS_ENDPOINT_URL: https://${{ secrets.DO_SPACE_REGION }}.digitaloceanspaces.com
101101
run: |
102-
aws s3 sync . s3://${{ secrets.DO_SPACE_NAME }}/unraid-api --checksum-algorithm CRC32
102+
# Upload files with explicit content encoding and public-read ACL
103+
aws s3 sync . s3://${{ secrets.DO_SPACE_NAME }}/unraid-api \
104+
--checksum-algorithm CRC32 \
105+
--no-guess-mime-type \
106+
--content-encoding none \
107+
--acl public-read
103108
104109
- name: Upload Release Files to Cloudflare Bucket
105110
env:
@@ -108,4 +113,9 @@ jobs:
108113
AWS_DEFAULT_REGION: auto
109114
AWS_ENDPOINT_URL: ${{ secrets.CF_ENDPOINT }}
110115
run: |
111-
aws s3 sync . s3://${{ secrets.CF_BUCKET }}/unraid-api --checksum-algorithm CRC32
116+
# Upload files with explicit content encoding and public-read ACL
117+
aws s3 sync . s3://${{ secrets.CF_BUCKET }}/unraid-api \
118+
--checksum-algorithm CRC32 \
119+
--no-guess-mime-type \
120+
--content-encoding none \
121+
--acl public-read

0 commit comments

Comments
 (0)