Skip to content

Commit 4f4b19b

Browse files
refactor(.github): rclone sync dry-run (#359)
1 parent 561564b commit 4f4b19b

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/sync-to-cdn.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,18 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@master
13-
- uses: jakejarvis/s3-sync-action@master
14-
with:
15-
args: --acl public-read --follow-symlinks --delete
13+
- name: install rclone
14+
run: sudo apt-get install -y rclone
15+
16+
- name: sync to S3
1617
env:
17-
# https://github.com/jakejarvis/s3-sync-action#configuration
18-
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
1918
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
2019
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
21-
SOURCE_DIR: 'build'
20+
BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET }}
21+
22+
RCLONE_CONFIG_TARGET_TYPE: s3
23+
RCLONE_CONFIG_TARGET_PROVIDER: AWS
24+
RCLONE_CONFIG_TARGET_ENV_AUTH: true
25+
RCLONE_CONFIG_TARGET_ACL: public-read
26+
run: |
27+
rclone sync build/ target:$BUCKET_NAME --checksum --fast-list --verbose --dry-run

0 commit comments

Comments
 (0)