chore(deploy): 简化 nginx 路由 + 自动部署 nginx config + 删除 .github workflows
Deploy / deploy (push) Successful in 1m16s

- nginx: /app/ → Flutter,/ 兜底 → 营销站,移除零散 location 块
- deploy.yml: 每次部署自动 scp nginx-jiu.conf 到服务器并 nginx -t reload
- deploy.yml: Release 附件新增 configs.tar.gz(nginx/systemd/compose 配置)
- 删除 .github/workflows/(已全部迁移到 .gitea/)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-05-24 12:44:50 +08:00
parent 32ea281dfa
commit 988a941b41
5 changed files with 18 additions and 162 deletions
+5 -26
View File
@@ -22,44 +22,23 @@ server {
proxy_read_timeout 30s;
}
# Flutter 管理端(/app/ 路径)
# Flutter 管理端(/app/ 前缀,不污染根路径)
location /app/ {
alias /opt/jiu/web/;
index index.html;
try_files $uri $uri/ /app/index.html;
}
# Flutter 公开商品扫码页(/product/:id → Flutter app
location /product/ {
alias /opt/jiu/web/;
try_files $uri /app/index.html;
}
# 营销站点 — 精确路径
location = / {
root /opt/jiu/marketing;
try_files /index.html =404;
}
location ~ ^/(docs|download)(\.html)?$ {
root /opt/jiu/marketing;
try_files /$1.html =404;
}
location /features/ {
root /opt/jiu/marketing;
try_files $uri $uri.html =404;
}
# 营销站点 — 扫码 HTML 页(保留旧链接兼容)
# 扫码页(/scan/<id>scan.htmlJS 从 URL 读取 id
location /scan/ {
root /opt/jiu/marketing;
try_files /scan.html =404;
}
# 营销静态资源(CSS / SVG / 图片等
location /assets/ {
# 营销站点兜底(根路径及所有其他路径
location / {
root /opt/jiu/marketing;
expires 7d;
add_header Cache-Control "public";
try_files $uri $uri.html $uri/index.html /index.html;
}
}