chore: 强制提交dist命令

This commit is contained in:
lzh
2025-12-23 13:53:31 +08:00
parent 2b238136ad
commit 3c206a831e
3 changed files with 24 additions and 11 deletions

View File

@@ -114,22 +114,26 @@ git push origin master
### 1. 构建产物必须提交到 Git
**必须确保** `apps/web-antd/dist` 目录被 Git 跟踪,否则 CI/CD 无法检测到变化
**重要**`apps/web-antd/dist` 目录`.gitignore` 中被忽略,但我们需要将其提交到 Git 才能触发 CI/CD
**脚本会自动处理**
- 构建脚本(`build-and-push.sh``build-and-push.ps1`)会自动使用 `git add -f` 强制添加 dist 目录
- 你不需要手动修改 `.gitignore` 文件
**手动添加方法**(如果使用脚本):
```bash
# 强制添加被忽略的 dist 目录
git add -f apps/web-antd/dist
```
**检查方法**
```bash
# 检查 dist 是否被 Git 跟踪
git ls-files apps/web-antd/dist
# 如果输出为空,说明 dist 未被跟踪
# 如果输出为空,说明 dist 未被跟踪,需要使用 -f 强制添加
```
**解决方法**
- 如果 `dist``.gitignore` 中,需要临时移除或使用强制添加:
```bash
git add -f apps/web-antd/dist
```
### 2. 修改源码后必须重新构建
**重要**修改源码后CI/CD **不会自动触发**,需要: