From cdb1db2db6f3576a56aee8c0a15ce9c065181261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B0=E6=9C=94?= <565183519@qq.com> Date: Tue, 24 Mar 2026 08:05:43 +0800 Subject: [PATCH] Add GitHub Actions workflow for Google Drive sync --- .github/workflows/sync.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/sync.yml diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 00000000..f8ebe113 --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,23 @@ +name: Guanghu Grid Sync + +on: + push: + branches: + - main # 当你修改仓库代码时自动触发 + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Sync to Google Drive + uses: wei/rclone@v1 + env: + RCLONE_CONFIG_DRIVE_TYPE: drive + RCLONE_CONFIG_DRIVE_SCOPE: drive + RCLONE_CONFIG_DRIVE_SERVICE_ACCOUNT_CONTENTS: ${{ secrets.GOOGLE_DRIVE_SERVICE_ACCOUNT }} + RCLONE_CONFIG_DRIVE_ROOT_FOLDER_ID: ${{ secrets.DRIVE_MIRROR_FOLDER_ID }} + with: + args: sync . drive: