docs: add Upyun CDN upload requirement for frontend deploy

This commit is contained in:
2026-05-01 15:38:40 +08:00
parent b8f87c4d40
commit 541814307c
+20
View File
@@ -41,6 +41,26 @@ cargo build --release # 后端
**Why:** 二进制/构建产物拷贝绕过构建系统,会引入静默的架构或链接不匹配问题。git 工作流确保二进制与代码一致、依赖已解析、构建可重复。
### 前端部署提醒:必须上传静态资源到又拍云 CDN
`cp_dist_huiwing.sh` / `cp_dist_moicen.sh` 已自动包含又拍云上传步骤。
**严禁**只手动 `sudo cp` 而不上传 CDN。HTML 中的 JS/CSS 链接指向 `static.*` CDN 域名(又拍云),而非 nginx 本地目录。若只拷贝到 nginx,JS 会返回 404,页面为空白白屏。
```bash
# 正确:执行完整部署脚本
sh cp_dist_huiwing.sh
# 错误(从仓库复制到 nginx 但跳过 CDN,会导致白屏)
sudo cp -r dist/* /usr/local/openresty/nginx/html/music-room/
```
手动修复白屏:
```bash
cd /mnt/huiwing/huike-front/cdn
sh upload_assets.sh .huiwing_upyun_pass 1
```
---