Skip to content

Commit ae8b0a1

Browse files
committed
add r2 upload action
1 parent ac60307 commit ae8b0a1

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/r2-upload.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Upload to R2
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'content/**'
9+
10+
jobs:
11+
upload:
12+
runs-on: ubuntu-latest
13+
14+
permissions:
15+
contents: read
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Configure AWS Credentials
21+
uses: aws-actions/configure-aws-credentials@v4.1.0
22+
with:
23+
aws-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
24+
aws-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
25+
aws-region: auto
26+
endpoint-url: https://a41d50ecaf0ae0f86dd1824ef6729cb2.r2.cloudflarestorage.com
27+
28+
- name: Sync content directory to R2
29+
run: |
30+
aws s3 sync content/ s3://kcd-rag/content/ \
31+
--endpoint-url https://a41d50ecaf0ae0f86dd1824ef6729cb2.r2.cloudflarestorage.com \
32+
--size-only --delete

0 commit comments

Comments
 (0)