diff --git a/README.md b/README.md index 2aa515e..45afd4a 100644 --- a/README.md +++ b/README.md @@ -295,10 +295,43 @@ DY_API_KEY= # 可选;非空则写操作需密钥 TZ=Asia/Shanghai ``` -## Git +## Git 管理规范 + +**仓库**:`https://gitea.dsx2020.com/eric/douyinWEB.git`(账号 `eric`) + +**分支策略**: + +| 分支 | 用途 | +|------|------| +| `main` | 本地 Windows 快照;不直接部署到服务器 | +| `dev` | 服务器线上运行代码;所有功能开发在此分支 | + +**开发流程(必须严格执行)**: ``` -https://gitea.dsx2020.com/eric/douyinWEB.git +本地修改代码 + → git add / git commit(dev 分支) + → git push origin dev + → 服务器: git pull origin dev + → systemctl restart douyinweb-api + → cd /opt/douyinWEB/frontend && npm run build + → systemctl restart douyinweb-web +``` + +**每次 git push 后,必须立即同步**: +1. Windows 本机:`git pull origin dev`(保持本地与远端一致) +2. 服务器:`git pull origin dev` + 重启相关服务 + 重新 build 前端 + +**禁止行为**: +- 禁止在服务器上直接修改代码文件(必须走 git) +- 禁止用 sftp/scp 覆盖服务器上的代码文件 +- 禁止 `git reset --hard` / `git stash apply` 等操作破坏服务器工作区 +- 禁止将 `monitor.db` / `pb_data/` 等运行时数据文件纳入 git commit + +**快速部署脚本**: + +```bat +python scripts\_deploy.py # git pull + restart API + npm build + restart web ``` ## 说明 diff --git a/frontend/src/app/shorts/page.tsx b/frontend/src/app/shorts/page.tsx index 2b2f951..153aa54 100644 --- a/frontend/src/app/shorts/page.tsx +++ b/frontend/src/app/shorts/page.tsx @@ -1007,7 +1007,7 @@ export default function ShortsPage() { -
+