ci: 新增 PR 轻量检查工作流, AGENTS.md 补充 CI/CD 自动部署说明
This commit is contained in:
@@ -30,6 +30,8 @@ ETL 工作流项目,使用 [Prefect](https://docs.prefect.org.cn/v3/get-started)
|
||||
- worker 是 **Docker 容器**(`prefect-worker` 服务,基于 `Dockerfile`),镜像只装依赖(git + uv 按锁文件装),**不烤业务代码**;每个 flow run 执行前,pull 步骤从 Gitea **clone 最新代码**(token 存 `gitea-token` Secret Block,运行时解析)。
|
||||
- **改 flow 代码 → `git push` → 下次 run 自动用新代码**(worker 不重启、不 redeploy);改 deployment 配置(cron/参数)才需重跑 `uv run prefect deploy --all`(读取 `prefect.yaml`)。
|
||||
- **日常开发流程**:clone Gitea 仓库 → 改代码 → `git push` → 自动生效。
|
||||
- **CI/CD 自动部署**:develop 合并到 main(push)→ Gitea webhook → 本机 9000 的 `inkreach-prefect-webhook` 服务(systemd,deploy 账号)→ 自动 `git pull + uv sync + prefect deploy --all` → 企微群通知。CI 检查:`.gitea/workflows/ci.yml`,PR 到 develop/main 时跑轻量语法检查(runner 标签 ubuntu-latest,本机 gitea-act-runner)。
|
||||
- 部署脚本与密钥在 `/opt/inkreach-prefect-deploy/`(deploy.sh / rollback.sh / status.sh / webhook.secret / wecom_webhook.txt,均 deploy 账号所有);代码检出在 `/opt/inkreach-prefect`(deploy 账号所有,deploy.sh 自动 reset 到 origin/main)。
|
||||
|
||||
## 密钥管理(标准做法)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user