ci: 增加发布产物打包脚本

This commit is contained in:
que01 committed 2026-10-12 00:46:07 +08:00
1 parent 9c15a822e9
commit f57c0ca0ea
3 files changed
+59

No files matched your search

+8
View File
@@ -68,6 +68,14 @@ pnpm --filter @personal-brand/api db:migrate:deploy
部署产物中的模板预览入口是 `apps/admin/dist/template-preview/index.html`,资源位于同级 `assets`、`css`、`js` 目录,线上必须保留 `/template-preview/` 前缀。
也可以把生产产物整理成统一发布目录:
```bash
pnpm deploy:package
```
脚本会先执行数据库迁移,再生成 `dist/release`,其中 `admin/` 是静态站点,`api/` 是编译后的 API 产物,`manifest.json` 记录关键入口的大小和 SHA-256。发布进程需要保留 API 的 `node_modules` 或在目标机器重新执行 `pnpm install --prod --frozen-lockfile`。
首次部署可以执行一次 `pnpm db:seed` 创建管理员与演示品牌。已有生产环境禁止重复执行种子命令;模板示例内容只能由管理员在后台对指定品牌显式导入,不能把示例数据扩展到全局种子。
### 3. 发布前门禁