[{"data":1,"prerenderedAt":262,"buildId":263},["ShallowReactive",2],{"-docs-deployment-gitlab-ci-description":3,"docs--docs-deployment-gitlab-ci":16,"docs-navigation-zh-CN":168,"surround--docs-deployment-gitlab-ci":259},{"data":4,"body":5},{},{"type":6,"children":7},"root",[8],{"type":9,"tag":10,"props":11,"children":12},"element","p",{},[13],{"type":14,"value":15},"text","记录 GitLab CI 配置加载、构建产物和部署通知之间的依赖关系。",{"id":17,"title":18,"body":19,"category":152,"description":15,"difficulty":153,"extension":154,"index":155,"keywords":153,"links":156,"meta":161,"navigation":153,"path":163,"requires":153,"seo":164,"sitemap":165,"stem":166,"__hash__":167},"docs\u002Fdocs\u002F2.deployment\u002F6.gitlab-ci.md","GitLab CI\u002FCD 排查",{"type":20,"value":21,"toc":147},"minimark",[22,26,42,102,109,112,126,129,143],[23,24,25],"h2",{"id":25},"合并请求没有加载部署配置",[10,27,28,29,33,34,37,38,41],{},"GitLab 先解析 ",[30,31,32],"code",{},"include","，再合并主配置和被引入的文件。写在主配置全局 ",[30,35,36],{},"variables"," 里的 ",[30,39,40],{},"BUILD_ENV"," 还不能用于决定是否引入文件。按流水线来源和目标分支选择文件时，使用这一阶段可用的预定义变量：",[43,44,50],"pre",{"className":45,"code":46,"filename":47,"language":48,"meta":49,"style":49},"language-yaml shiki shiki-themes github-light github-light github-dark","include:\n  - local: .gitlab-dev.yml\n    rules:\n      - if: '$CI_PIPELINE_SOURCE == \"merge_request_event\" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == \"dev\"'\n",".gitlab-ci.yml","yaml","",[30,51,52,64,80,88],{"__ignoreMap":49},[53,54,57,60],"span",{"class":55,"line":56},"line",1,[53,58,32],{"class":59},"sovSZ",[53,61,63],{"class":62},"sxrX7",":\n",[53,65,67,70,73,76],{"class":55,"line":66},2,[53,68,69],{"class":62},"  - ",[53,71,72],{"class":59},"local",[53,74,75],{"class":62},": ",[53,77,79],{"class":78},"sIIMD",".gitlab-dev.yml\n",[53,81,83,86],{"class":55,"line":82},3,[53,84,85],{"class":59},"    rules",[53,87,63],{"class":62},[53,89,91,94,97,99],{"class":55,"line":90},4,[53,92,93],{"class":62},"      - ",[53,95,96],{"class":59},"if",[53,98,75],{"class":62},[53,100,101],{"class":78},"'$CI_PIPELINE_SOURCE == \"merge_request_event\" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == \"dev\"'\n",[10,103,104,105,108],{},"如果流水线已经创建但缺少作业，先在 Pipeline Editor 检查合并后的 YAML，再查作业自己的 ",[30,106,107],{},"rules","。",[23,110,111],{"id":111},"构建成功却没有产物",[10,113,114,117,118,121,122,125],{},[30,115,116],{},"artifacts:paths"," 相对于 ",[30,119,120],{},"$CI_PROJECT_DIR","。构建脚本即使写入了绝对路径，归档也应该使用仓库工作目录内的相对路径。看到 ",[30,123,124],{},"no matching files"," 时，先核对构建命令实际输出的位置和作业运行目录。",[23,127,128],{"id":128},"成功通知早于部署",[10,130,131,134,135,138,139,142],{},[30,132,133],{},"needs"," 决定作业可以何时开始。只依赖 ",[30,136,137],{},"build"," 的成功通知可以在部署结束前发送。把成功通知依赖改为 ",[30,140,141],{},"deploy","，并让其使用与部署一致的触发规则。",[144,145,146],"style",{},"html pre.shiki code .sovSZ, html code.shiki .sovSZ{--shiki-light:#22863A;--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":49,"searchDepth":66,"depth":82,"links":148},[149,150,151],{"id":25,"depth":66,"text":25},{"id":111,"depth":66,"text":111},{"id":128,"depth":66,"text":128},"ci",null,"md",false,[157],{"label":158,"icon":159,"to":160},"GitLab CI\u002FCD 语法","i-simple-icons-gitlab","https:\u002F\u002Fdocs.gitlab.com\u002Fci\u002Fyaml\u002F",{"date":162},"2026-11-30T17:42:46+08:00","\u002Fdocs\u002Fdeployment\u002Fgitlab-ci",{"title":18,"description":15},{"loc":163},"docs\u002F2.deployment\u002F6.gitlab-ci","7sUVDofjSwQ-nOB1dj1-TUWDI4v1PUjaqOvWnLQVsqA",[169],{"title":170,"path":171,"stem":172,"children":173,"page":155},"Docs","\u002Fdocs","docs",[174,196,230,247],{"title":175,"category":153,"description":176,"icon":177,"date":162,"path":178,"stem":179,"children":180,"page":155},"Nuxt 工程","Nuxt UI 样式、身份认证与 SSR 部署的排查记录","i-simple-icons-nuxt","\u002Fdocs\u002Fnuxt","docs\u002F1.nuxt",[181,186,191],{"title":182,"path":183,"stem":184,"category":153,"description":185},"Nuxt UI componentDetection 漏检","\u002Fdocs\u002Fnuxt\u002Fnuxt-ui-component-detection","docs\u002F1.nuxt\u002F1.nuxt-ui-component-detection","解决 @nuxt\u002Fui 开启 componentDetection 后，部分组件主题 CSS 未生成、样式完全缺失的问题。",{"title":187,"path":188,"stem":189,"category":153,"description":190},"自建服务器 GitHub OAuth 回调 500 排查","\u002Fdocs\u002Fnuxt\u002Fself-hosted-oauth-500","docs\u002F1.nuxt\u002F2.self-hosted-oauth-500","汇总自建 Docker + nginx 环境下 \u002Fauth\u002Fgithub 回调返回 500 的三种独立根因——出海代理超时、数据库连接串在构建期被固化、跨 Docker 网络 DNS 解析失败，提供速查表快速定位与逐一修复步骤。",{"title":192,"path":193,"stem":194,"category":153,"description":195},"Nuxt SSR + PM2 部署","\u002Fdocs\u002Fnuxt\u002Fssr-pm2-deploy","docs\u002F1.nuxt\u002F3.ssr-pm2-deploy","在宿主机用 PM2 集群运行 Nuxt SSR，并通过 Docker Nginx 反向代理与 Cloudflare 避坑要点。",{"title":197,"category":153,"description":198,"icon":199,"date":162,"path":200,"stem":201,"children":202,"page":155},"部署与运维","容器、数据库、证书与自动化发布","i-lucide-server","\u002Fdocs\u002Fdeployment","docs\u002F2.deployment",[203,209,214,219,224,229],{"title":204,"path":205,"stem":206,"category":207,"description":208},"Docker Nginx 反向代理","\u002Fdocs\u002Fdeployment\u002Fdocker","docs\u002F2.deployment\u002F1.docker","infra","用 Docker Compose 部署 Nginx，配置同网络容器或宿主机反向代理，并排查常见网络问题。",{"title":210,"path":211,"stem":212,"category":207,"description":213},"数据库部署","\u002Fdocs\u002Fdeployment\u002Fdatabase","docs\u002F2.deployment\u002F2.database","使用 Docker Compose 本地监听部署 PostgreSQL 与 Redis，配置备份恢复、PostGIS 及 Redis 持久化。",{"title":215,"path":216,"stem":217,"category":207,"description":218},"SSL 证书配置","\u002Fdocs\u002Fdeployment\u002Fssl-certificate","docs\u002F2.deployment\u002F3.ssl-certificate","Cloudflare Origin 证书与 Let's Encrypt（acme.sh）选型配置、Nginx HTTPS 片段与常见 TLS 故障排查。",{"title":220,"path":221,"stem":222,"category":152,"description":223},"GitHub Actions 发布容器镜像","\u002Fdocs\u002Fdeployment\u002Fgithub-actions","docs\u002F2.deployment\u002F4.github-actions","用 GitHub Actions 发布镜像到 GHCR，解释镜像版本与容器重建后的反代行为。",{"title":225,"path":226,"stem":227,"category":152,"description":228},"GitHub CI 镜像加速","\u002Fdocs\u002Fdeployment\u002Fgithub-ci-mirror-acceleration","docs\u002F2.deployment\u002F5.github-ci-mirror-acceleration","在国内云服务器上通过同步腾讯云 TCR 或配置 Mihomo 代理，加速拉取 GitHub Actions 构建的容器镜像。",{"title":18,"path":163,"stem":166,"category":152,"description":15},{"title":231,"category":153,"description":232,"icon":233,"date":162,"path":234,"stem":235,"children":236,"page":155},"平台集成","地图服务与政务应用接入中的实际问题","i-lucide-plug","\u002Fdocs\u002Fplatforms","docs\u002F3.platforms",[237,242],{"title":238,"path":239,"stem":240,"category":153,"description":241},"iServer 踩坑归集","\u002Fdocs\u002Fplatforms\u002Fiserver","docs\u002F3.platforms\u002F1.iserver","记录使用超图 iServer 地图与数据服务过程中的接口选型、常见问题排查与实用查询技巧。",{"title":243,"path":244,"stem":245,"category":153,"description":246},"浙政钉 H5 应用埋点","\u002Fdocs\u002Fplatforms\u002Fdingtalk","docs\u002F3.platforms\u002F2.dingtalk","在浙政钉 H5 单页应用中配置 aplus_queue 手动采集，按路由发送 PV 并安全绑定异步用户信息。",{"title":248,"category":153,"description":249,"icon":250,"date":162,"path":251,"stem":252,"children":253,"page":155},"开发环境与工具","pnpm 供应链策略与版本自举等工具链排错记录","i-lucide-wrench","\u002Fdocs\u002Ftools","docs\u002F4.tools",[254],{"title":255,"path":256,"stem":257,"category":153,"description":258},"pnpm 常见故障排查","\u002Fdocs\u002Ftools\u002Fpnpm","docs\u002F4.tools\u002F1.pnpm","通过错误信息区分依赖信任降级阻断（ERR_PNPM_TRUST_DOWNGRADE）与 pnpm 自举崩溃。",[260,261],{"title":225,"path":226,"stem":227,"description":228,"children":-1},{"title":238,"path":239,"stem":240,"description":241,"children":-1},1796031847501,"fbd03a9e-6514-4b03-ba93-9f40ff4dbee5"]