Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/sync-to-cdn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ on:
push:
branches:
- main
workflow_dispatch:

concurrency:
group: sync-to-cdn
cancel-in-progress: false

jobs:
deploy:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand All @@ -24,4 +30,16 @@ jobs:
RCLONE_CONFIG_TARGET_ENV_AUTH: true
RCLONE_CONFIG_TARGET_ACL: public-read
run: |
rclone sync build/ target:$BUCKET_NAME --checksum --fast-list --verbose
rclone sync build/ "target:$BUCKET_NAME" --checksum --fast-list --verbose

- name: sync to R2
env:
RCLONE_CONFIG_R2_TYPE: s3
RCLONE_CONFIG_R2_PROVIDER: Cloudflare
RCLONE_CONFIG_R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
RCLONE_CONFIG_R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
RCLONE_CONFIG_R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }}
RCLONE_CONFIG_R2_NO_CHECK_BUCKET: true
run: |
rclone version
rclone sync build/ r2:cdn-0 --checksum --fast-list --verbose
Loading