Skip to content

Commit 71f8c7e

Browse files
committed
updating script
1 parent ad08a6b commit 71f8c7e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/upload_to_cloudflare.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
- name: Install AWS CLI
1919
run: |
20-
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
20+
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
2121
unzip -o awscliv2.zip
2222
sudo ./aws/install --update
2323
aws --version
@@ -30,16 +30,18 @@ jobs:
3030
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
3131
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
3232
aws configure set default.region us-east-1
33-
# Set the Cloudflare R2 endpoint (replace with your actual endpoint if different)
34-
aws configure set default.s3.endpoint_url https://${{ vars.CLOUDFLARE_R2_ACCOUNT_ID }}.r2.cloudflarestorage.com
33+
# No endpoint configuration here
3534
3635
- name: Upload scripts to Cloudflare R2
3736
env:
38-
BUCKET_URL: s3://opengovernance # Use S3 URI format
37+
BUCKET_NAME: opengovernance
38+
ENDPOINT_URL: https://2d6651d596663cce624bd513238102e7.r2.cloudflarestorage.com
3939
SOURCE_DIR: scripts/
40-
TARGET_DIR: scripts/ # Adjust if you want a different target directory in R2
40+
TARGET_DIR: scripts/
4141
run: |
42-
aws s3 sync "$SOURCE_DIR" "$BUCKET_URL/$TARGET_DIR" --acl public-read
42+
aws s3 sync "$SOURCE_DIR" "s3://$BUCKET_NAME/$TARGET_DIR" \
43+
--endpoint-url "$ENDPOINT_URL" \
44+
--acl public-read
4345
4446
- name: Bump Version and Create Tag
4547
if: ${{ success() }}

0 commit comments

Comments
 (0)