文件
wechat-mp-research/sync-to-gitea.sh
2026-03-12 20:47:28 -04:00

14 行
379 B
Bash
可执行文件

#!/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"