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"