From d17e3a028fe50e1ff3d6dc7cb52aeb93ba3b7793 Mon Sep 17 00:00:00 2001 From: hao Date: Thu, 12 Mar 2026 20:47:28 -0400 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20Gitea=20=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sync-to-gitea.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 sync-to-gitea.sh diff --git a/sync-to-gitea.sh b/sync-to-gitea.sh new file mode 100755 index 0000000..0a893d0 --- /dev/null +++ b/sync-to-gitea.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# 同步项目变动到 Gitea 仓库 +# 用法: bash sync-to-gitea.sh "提交信息" + +cd /home/ubuntu/wechat-research-report + +MSG="${1:-自动同步更新}" + +git add -A +git diff --cached --quiet && echo "没有需要提交的变动" && exit 0 +git commit -m "$MSG" +git push gitea main +echo "✅ 已成功同步到 Gitea: https://git.hk.hao.work/hao/wechat-mp-research"