Henry_Du
f5b7bef285
fix(ci): Preflight npm ci 防超时 + Deploy job 误触发保护\n\n- deploy.yml preflight/安装依赖 Step:新增「双 registry 切换 + 3 轮重试 + npm fetch-retries=5 + fetch-timeout=5min + prefer-offline」\n - 主站 https://registry.npmmirror.com 备用 https://mirrors.cloud.tencent.com/npm/(两套独立 CDN 节点),奇偶次交替\n - npm 内部 read ETIMEDOUT(exit 146)自动走 fetch-retries 重试;整轮失败 bash 层 15s 后再跑下一轮\n - 失败 3 轮才真正 exit 1,并在日志中明确提示可覆盖 NPM_REGISTRY_PRIMARY/FALLBACK\n- deploy.yml deploy job:if 条件从 \x27!cancelled() && !failure()\x27 改为 \x27always() && needs.build-image.result == \x27\x27success\x27\x27\x27\n - 之前 build-image 被 skip(preflight 先失败)时,!failure() 为真导致 deploy 被触发但 IMAGE_NEW 空 → exit 9 误报为 deploy 本身错\n - 现在仅当 build-image 真的 success 时才会执行 deploy,build-image 被跳过/失败时 deploy 自动显示为 skipped(符合语义)
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Successful in 2m12s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Successful in 9m35s
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Successful in 6s
2026-09-13 00:21:09 +08:00
Henry_Du
a64fa6bc72
ci(deploy): Gitea Actions 自动接入微信OAuth(构建期+运行期双链路注入)\n\n- deploy.yml preflight/nuxt build step: env 注入 6 条 OAuth secrets;显式 export 给子进程,构建日志打印 AGGREGATE_OAUTH_APP_ID 有无值便于排错\n- deploy.yml deploy/SSH step: env 注入 6 条 OAuth secrets 传给远端 bash -s\n - 远端新增 upsert_env_key():对 .env 做 awk 整行覆盖 / 不存在追加,幂等(保证不破坏原有 POSTGRES_* / JWT_SECRET / NUXT_PUBLIC_* 等其它变量)\n - 仅当 AGGREGATE_OAUTH_APP_ID 非空才写入,避免把空值覆盖已有配置\n - 合并写入后立即在日志输出 [OAuth] 成功/跳过提示,无需手改服务器 .env\n- docker-compose.yml 已含 env_file: .env,合并写入后的变量会被容器自动加载为 process.env
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Failing after 46s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Skipped
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Failing after 4s
2026-09-13 00:10:54 +08:00
Henry_Du
bf7c40c4fe
fix(ci): 回滚 NODE_OPTIONS 非法 --gc-interval,解决 Run#56 立即 exit 9
...
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Successful in 2m9s
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Canceled after 0s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Canceled after 5m35s
- Node.js NODE_OPTIONS 不允许传 --gc-interval,导致 Run 56 刚启动 Node v0 检测时就 exit code 9 全局失败
- 保留 max-old-space-size=10240、expose-gc、drop_caches、DISABLE_ROLLDOWN=1、NITRO_MINIFY=false 所有有效内存缓解措施
2026-09-12 14:04:27 +08:00
Henry_Du
7ee5e8b9e9
fix(ci): 解决 Run#55 Nitro 再次 OOM:提升堆上限到 10G 并禁用压缩/minify
...
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Failing after 9s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Skipped
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Failing after 3s
- NODE_OPTIONS max-old-space-size 8192 → 10240,新增 --gc-interval=100000 主动 GC
- 构建前 drop_caches 清理页面缓存,降低系统级 RSS 压力
- 禁用 NITRO_MINIFY 与 DISABLE_ROLLDOWN,进一步降低峰值内存
- 构建前后打印内存快照,便于后续排障
2026-09-12 13:59:14 +08:00
Henry_Du
80b7c256b5
fix(ci): 修复 Run#53 Preflight 构建 Nitro 时 OOM exit 137
...
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Successful in 2m25s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Successful in 9m31s
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Successful in 6s
- 将 NODE_OPTIONS max-old-space-size 从 4096 提升至 8192,并加入 preflight job 全局 env
- 构建前打印系统内存状态,便于排障
- 显式声明 NITRO_PRESET=node-server,避免构建阶段默认解析不确定性
2026-09-12 12:57:32 +08:00
Henry_Du
4d39afd23f
fix(ci): replace heredoc-based ENV_SH with printf %q pipe → resolve yaml L544 could not find expected ':' colon false-positive + bash -s positional arg for env source
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Successful in 2m9s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Successful in 8m57s
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Successful in 6s
2026-09-12 00:54:20 +08:00
Henry_Du
e4fe591b82
fix(ci): propagate deploy env vars via remote /tmp file + bash -s arg + fail-fast if IMAGE_NEW/DEPLOY_PATH empty - resolves 5s fake-success deploys using stale :latest image
2026-09-12 00:40:40 +08:00
Henry_Du
87276f5add
fix(ci): bump preflight node heap from 2G to 4G - resolves TASK-67 nitro esbuild OOM exit 137
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Successful in 2m9s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Successful in 10m19s
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Successful in 5s
2026-09-12 00:20:08 +08:00
Henry_Du
6462b1b8a1
fix(ci): embed python scripts as base64 to avoid YAML block scalar + preflight indentation conflict - resolves TASK-63 build-image IndentationError: unexpected indent
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Successful in 2m8s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Successful in 10m12s
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Successful in 18s
2026-09-11 23:35:12 +08:00
Henry_Du
0373c19b54
fix(ci): remove actions/setup-node; use npmmirror/gh-proxy for all remote fetches
...
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Failing after 8s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Skipped
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Failing after 3s
Issue: actions/setup-node@v4 directly connects to https://github.com/actions/node-versions/releases/download/ ... to download Node tarballs (log line Acquiring node-v*-linux-x64.tar.gz), which is throttled or connection-reset from inside China, causing preflight to hang until 15m timeout.
Fix: align preflight with build-image job policy (NO third-party 'uses:' directives, ALL remote resources use CN mirrors or GH_PROXY_PREFIX):
- Remove uses: actions/setup-node@v4 completely; replace with plain run steps
- 3-tier Node 22 readiness with zero direct github.com connections:
1) Fast path: reuse Runner's system node if major version >= 22, skip download entirely
2) Primary: fetch Node 22 tarball from npmmirror CN binary mirror (https://registry.npmmirror.com/-/binary/node/ ...) and auto-resolve latest 22.x patch via npmmirror index.json using python3 single-quote script + printf stdin (NO heredoc, which previously caused YAML block-scalar indentation parse errors)
3) Fallback: GH_PROXY_PREFIX + official nodejs.org dist URL for the same tarball (proxied, never plain github.com)
- NODE_VERSION_FALLBACK=22.13.0 fixed guard when index resolution fails
- Post-install: prepend new node bin PATH to GITHUB_ENV so subsequent steps (clone / npm ci / nuxt build) inherit Node 22 automatically
- Audit: grep deploy.yml now yields zero 'uses:' directives
2026-09-11 22:46:40 +08:00
Henry_Du
afb4cd3669
fix(ci): 修复 deploy.yml YAML 语法错误(line 177 could not find expected ':'),消除 heredoc 与块标量缩进冲突
...
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Failing after 15m2s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Skipped
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Failing after 3s
- 根因:build-image job 注入 Docker daemon.json 时用了 bash heredoc <<'PY'...PY;heredoc 内部 Python 代码在 YAML 文件里缩进为 0,触发 run:| 字面块标量提前结束;Gitea YAML 解析器尝试把下一行解析为新的 key 却找不到冒号 → 抛 line 177 could not find expected ':',整个 workflow 无法触发
- 修复:移除 heredoc 结构,改为 PY_CODE 单引号字符串 + printf '%s' | python3 - stdin 管道传递;单引号内所有 Python 行统一保持与外层 shell 语句一致的 12 spaces 前导缩进(满足 YAML 块标量 ≥ 10 spaces 基础缩进要求);Python 顶级代码统一缩进 12 spaces,块内再缩进 4 spaces,避免 IndentationError
- 验证:IDE YAML 诊断 0 错误;Gitea Actions 页左侧 deploy.yml 红色感叹号应立即消失,可正常触发 run
2026-09-11 22:28:42 +08:00
Henry_Du
124280a92f
fix(ci): 消除 preflight Set up job docker pull 卡点,改用宿主机 Node 22 + daemon.json mirrors + Dockerfile ARG 双保险
...
- preflight:删除 container.image: node:22-bookworm-slim,避免 Runner 在 Set up job 阶段独立 docker pull(国内连 Hub 被限速一直卡)
- preflight:改用 runs-on 直出 + actions/setup-node@v4 装 Node 22,npm registry 设 npmmirror
- build-image:python3 合法合成 /etc/docker/daemon.json 注入 3 组 docker.io registry mirrors(daocloud/1panel/1ms.run),systemctl→service→失败跳过 三级 non-intrusive 重启 docker
- Dockerfile:新增全局 ARG DOCKER_MIRROR / NODE_BUILDER_TAG / NODE_RUNTIME_TAG,FROM 统一前缀化;本地开发 DOCKER_MIRROR 为空时等价原写法,体验不变
- buildx BUILD_ARGS:新增 3 个 --build-arg 把 DOCKER_MIRROR_PREFIX / NODE_BUILDER_TAG / NODE_RUNTIME_TAG 传入,CI 拉 node:22-alpine 必走国内源
- 修复后:workflow 触发时 Preflight 日志不会再出现 Starting job container / docker pull image=node:***-bookworm-slim;前面 system-settings defaults 兜底修复可顺利部署上线
2026-09-11 21:59:19 +08:00
Henry_Du
43e2a05666
fix(ci): docker-compose.override.yml 生成方式从 heredoc 改 printf 单行拼,彻底绕开 bash heredoc 结束分隔符必须行首 + 变量不展开 + YAML parser 误判 services: 三重坑
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Successful in 2m22s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Successful in 9m14s
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Successful in 6s
2026-09-06 15:10:36 +08:00
Henry_Du
732c9c6725
fix(ci): deploy Job 增加目录可写性预检查 + docker-compose.override.yml heredoc 分隔符改 COMPOSE_OVERRIDE 并对齐缩进(绕开 YAML parser 误判 + 权限问题友好排查)
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Successful in 2m31s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Successful in 9m16s
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Successful in 4s
2026-09-06 14:17:05 +08:00
Henry_Du
496edf9f71
fix(ci): buildx build --load -> 宿主 docker push 两阶段,彻底绕开 buildkitd OAuth2 空 token 推送失败
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Successful in 2m35s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Successful in 9m43s
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Failing after 4s
2026-09-06 13:55:40 +08:00
Henry_Du
2097608f51
fix(ci): buildkitd.toml 注入 Gitea Basic Auth 凭据,绕开 OAuth2 空 token(authorization server did not include a token)
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Successful in 2m26s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Failing after 7m35s
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Skipped
2026-09-06 13:42:04 +08:00
Henry_Du
455438aa64
fix(ci): Docker Registry 仓库路径 owner/repo/tag 强制全小写,修 repository name must be lowercase
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Successful in 2m30s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Failing after 17m18s
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Skipped
2026-09-06 13:17:50 +08:00
Henry_Du
d98fe53658
fix(ci): docker buildx build 删除不支持的 --context flag,改为末尾位置参数 .
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Successful in 2m57s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Failing after 4m14s
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Skipped
2026-09-06 12:23:15 +08:00
Henry_Du
7b8dabdb49
perf(ci): buildx builder 预拉 moby/buildkit 走国内 registry-mirrors,提速启动 5-10 倍
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Successful in 2m26s
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Canceled after 0s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Canceled after 52s
2026-09-06 12:19:49 +08:00
Henry_Du
e65c65d8e3
fix(ci): 构建 Job 修复 buildx create 空 env= 参数导致的 invalid driver option env 报错
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Successful in 2m29s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Failing after 14m44s
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Skipped
2026-09-06 11:59:42 +08:00
Henry_Du
167b60a368
fix(ci): 修复 Preflight/构建 Job 源死循环(ca-certificates 与 HTTPS 镜像源鸡生蛋问题)
...
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Failing after 1m36s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Skipped
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Failing after 4s
- env 新增 HTTP/HTTPS 双套镜像源变量(Debian bookworm + Ubuntu 22.04)
- Preflight(Debian slim 容器):Step 0 先用 HTTP 清华源 apt-get 装 ca-certificates
+ update-ca-certificates;Step 1 有证书后再切 HTTPS 清华源装 git/curl
- build-image(Ubuntu 宿主 Runner):apt-get 用默认 HTTP archive.ubuntu.com 先装
ca-certificates;之后再 sed 换 HTTPS 清华源,避免同样的证书死循环
- 本地 yaml.safe_load 验证通过(YAML_OK);grep uses: 0 行;grep GH_PROXY_PREFIX 7 处
全部走用户指定的 https://v4.gh-proxy.org/ 前缀
2026-09-06 11:40:32 +08:00
Henry_Du
10117fc7e2
perf(ci): 所有 Job Debian/Ubuntu 换清华源 + GitHub 访问统一走 v4.gh-proxy.org 前缀代理 + Buildx registry-mirrors
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Failing after 8s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Skipped
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Failing after 4s
2026-09-06 11:32:31 +08:00
Henry_Du
cfd90865c8
refactor(ci): 移除所有第三方 uses action,改用纯 run 命令(规避 GitHub 下载超时)
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Canceled after 0s
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Canceled after 0s
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Canceled after 11m42s
2026-09-06 11:20:52 +08:00
Henry_Du
cfe3d5bfc5
fix: 同步 package-lock.json + 删除 qq-music-api 残留 + npm ci 加 --legacy-peer-deps
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Failing after 1m18s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Skipped
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Failing after 2m1s
2026-09-06 10:58:20 +08:00
Henry_Du
10d363ca2b
style(ci): 移除工作流步骤中的 emoji,改用专业风格命名
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Canceled after 4m27s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Skipped
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Canceled after 5m33s
2026-09-06 10:35:56 +08:00
Henry_Du
97af401d89
fix(ci): Preflight 改为 Gitea 标准 container:image 写法(runs-on 只填 ubuntu-latest,避免 no runner matched)
构建 & 部署 BYW VoiceHub / 构建并推送镜像 (push) Canceled after 0s
构建 & 部署 BYW VoiceHub / 部署到生产服务器 (push) Canceled after 0s
构建 & 部署 BYW VoiceHub / Preflight 语法 & 构建检查 (push) Canceled after 3m0s
2026-09-06 10:32:55 +08:00
Henry_Du
7b3294a380
fix(ci): Preflight 直接跑 docker://node:22-bookworm-slim 跳过 setup-node 下载(国内 GitHub release 超时)
构建 & 部署 BYW VoiceHub / Preflight 语法 & 构建检查 (push) Canceled after 0s
构建 & 部署 BYW VoiceHub / 构建并推送镜像 (push) Canceled after 0s
构建 & 部署 BYW VoiceHub / 部署到生产服务器 (push) Canceled after 0s
2026-09-06 10:30:51 +08:00
Henry_Du
082b5c854c
fix(ci): deploy.yml 改为用户真实 GITEA_HOST 和 DEPLOY_PATH(/data/opt/byw-voicehub)
构建 & 部署 BYW VoiceHub / 构建并推送镜像 (push) Canceled after 0s
构建 & 部署 BYW VoiceHub / 部署到生产服务器 (push) Canceled after 0s
构建 & 部署 BYW VoiceHub / Preflight 语法 & 构建检查 (push) Canceled after 3m44s
2026-09-06 10:21:48 +08:00
Henry_Du
5d015a3529
ci: 新增 Gitea Actions 部署流水线 + Runner/Deploy 一键脚本
构建 & 部署 BYW VoiceHub / Preflight 语法 & 构建检查 (push) Canceled after 0s
构建 & 部署 BYW VoiceHub / 构建并推送镜像 (push) Canceled after 0s
构建 & 部署 BYW VoiceHub / 部署到生产服务器 (push) Canceled after 0s
2026-09-06 08:44:11 +08:00
Henry_Du
1718542228
chore(deploy): 修复 Docker 启动链 + 补 compose + Gitea Actions
构建并部署 VoiceHub / 构建 Docker 镜像 (push) Canceled after 0s
构建并部署 VoiceHub / 部署到服务器 (push) Canceled after 0s
2026-09-06 08:23:39 +08:00