简化 Debian 发布流程并添加项目文档系统
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in -13s
Build and Release / build-and-test (amd64, alpine) (push) Successful in -6s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in -7s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 7s
Build and Release / release (push) Successful in 21s

- 将 Debian 包仓库从 bookworm/trixie 双发行版改为通用 stable 仓库
- 新增完整的 llmdoc 文档系统,包含架构、指南和参考文档
- 更新 README.md 和部署指南以反映新的仓库配置
- 添加 .gitignore 文件
This commit is contained in:
2025-12-25 10:18:07 +08:00
parent 76aac67b71
commit 9afe4a8649
28 changed files with 1297 additions and 31 deletions

View File

@@ -0,0 +1,73 @@
# 如何修改 CI/CD 工作流
## 1. 关键文件位置
- 工作流定义:`.gitea/workflows/ci.yaml`
- Debian 打包脚本:`debian/build-deb.sh`
## 2. 修改构建作业
### 2.1 添加新构建步骤
`build-and-test` 作业中添加步骤:
```yaml
- name: 新构建步骤
run: |
# 添加新的构建或测试逻辑
```
### 2.2 调整构建矩阵
修改 `strategy.matrix` 部分:
```yaml
strategy:
matrix:
arch: [amd64, arm64, riscv64] # 添加新架构
distro: [ubuntu, alpine, fedora] # 添加新发行版
```
## 3. 修改发布作业
### 3.1 调整上传逻辑
`release` 作业中修改上传代码:
```yaml
- name: 上传到新的包管理器
run: |
# 添加新的上传目标
```
### 3.2 定制 Release 说明
修改 Python 代码生成 Release 说明:
```python
# 在生成 Release 说明的代码块中添加自定义逻辑
```
## 4. Debian 打包定制
### 4.1 修改打包脚本
编辑 `debian/build-deb.sh`
- 添加新的架构支持
- 调整文件权限
- 修改 systemd 服务配置
### 4.2 更新控制文件模板
修改 `debian/control.template`
- 更新依赖关系
- 调整包元数据
## 5. 测试工作流变更
### 5.1 本地测试
```bash
# 使用 act 或 gitea-act 在本地测试工作流
act -j build-and-test
```
### 5.2 分支测试
1. 创建新分支
2. 推送修改
3. 检查 CI 构建结果
## 6. 最佳实践
- 保持向后兼容性
- 详细记录工作流变更
- 增量测试新功能
- 遵循现有的构建和打包模式