-
Notifications
You must be signed in to change notification settings - Fork 8
41 lines (38 loc) · 1.14 KB
/
rclone-action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
name: "🔄 Rclone"
on:
push:
branches: [main]
paths:
- "static/**"
- ".github/workflows/rclone-action.yml"
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
sync:
if: github.repository == 'z-shell/wiki'
runs-on: ubuntu-latest
environment: R2
env:
img_local_path: "static/img"
img_remote_path: "r2store:r2-store/img"
assets_local_path: "static/assets"
assets_remote_path: "r2store:r2-store/assets"
steps:
- name: "⤵️ Check out code from GitHub"
uses: actions/checkout@v4
- name: "⏫ Run rclone/r2-store/img"
uses: z-shell/.github/actions/rclone@main
with:
config: ${{ secrets.R2_STORE }}
args: "copy ${{ env.img_local_path }} ${{ env.img_remote_path }}"
debug: false
- name: "⏫ Run rclone/r2-store/assets"
uses: z-shell/.github/actions/rclone@main
with:
config: ${{ secrets.R2_STORE }}
args: "copy ${{ env.assets_local_path }} ${{ env.assets_remote_path }}"
debug: false