File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,34 @@ jobs:
1818 - name : Install AWS CLI
1919 uses : unfor19/install-aws-cli-action@v1.0.7
2020
21+ - name : Verify R2 Access
22+ env :
23+ AWS_ACCESS_KEY_ID : ${{ secrets.R2_ACCESS_KEY_ID }}
24+ AWS_SECRET_ACCESS_KEY : ${{ secrets.R2_SECRET_ACCESS_KEY }}
25+ AWS_ENDPOINT_URL : https://a41d50ecaf0ae0f86dd1824ef6729cb2.r2.cloudflarestorage.com
26+ AWS_DEFAULT_REGION : auto
27+ run : |
28+ echo "Testing bucket access..."
29+ aws s3 ls s3://kcd-rag/ --endpoint-url $AWS_ENDPOINT_URL
30+ echo "Testing bucket write..."
31+ echo "test" > test.txt
32+ aws s3 cp test.txt s3://kcd-rag/test.txt --endpoint-url $AWS_ENDPOINT_URL
33+ aws s3 rm s3://kcd-rag/test.txt --endpoint-url $AWS_ENDPOINT_URL
34+
2135 - name : Sync content directory to R2
2236 env :
2337 AWS_ACCESS_KEY_ID : ${{ secrets.R2_ACCESS_KEY_ID }}
2438 AWS_SECRET_ACCESS_KEY : ${{ secrets.R2_SECRET_ACCESS_KEY }}
2539 AWS_ENDPOINT_URL : https://a41d50ecaf0ae0f86dd1824ef6729cb2.r2.cloudflarestorage.com
2640 AWS_DEFAULT_REGION : auto
2741 run : |
42+ echo "Files to be synced:"
43+ find content -type f | wc -l
44+
45+ echo "Starting sync..."
2846 aws s3 sync content/ s3://kcd-rag/content/ \
2947 --endpoint-url $AWS_ENDPOINT_URL \
3048 --size-only --delete
49+
50+ echo "Verifying upload..."
51+ aws s3 ls s3://kcd-rag/content/ --endpoint-url $AWS_ENDPOINT_URL --recursive
You can’t perform that action at this time.
0 commit comments