From 87538487714f60ed27ce0a525c7c5ba11c1db297 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Mar 2026 09:48:44 +0000 Subject: [PATCH 1/6] Initial plan From 90883a87ab99aef4c4d7f38c8d4ea6863e6596f2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Mar 2026 09:54:24 +0000 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=A7=8A=20=E5=86=B0=E6=9C=94=E4=BA=BA?= =?UTF-8?q?=E6=A0=BC=E4=BD=93=EF=BC=9A=E4=BF=AE=E5=A4=8D=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E9=98=BB=E5=A1=9E=20=C2=B7=20=E7=A7=BB=E9=99=A4=E5=9D=8F=20sub?= =?UTF-8?q?module=20+=20=E7=AB=9E=E6=80=81=E6=9D=A1=E4=BB=B6=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20+=20rsync=20=E4=BF=9D=E9=9A=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- .github/workflows/deploy-to-server.yml | 7 +++++++ .github/workflows/generate-module-doc.yml | 7 ++++++- .github/workflows/update-repo-map.yml | 8 +++++++- m18-health-check | 1 - m18-health-check/README.md | 5 +++++ 5 files changed, 25 insertions(+), 3 deletions(-) delete mode 160000 m18-health-check create mode 100644 m18-health-check/README.md diff --git a/.github/workflows/deploy-to-server.yml b/.github/workflows/deploy-to-server.yml index 1f05b654..06b50f4e 100644 --- a/.github/workflows/deploy-to-server.yml +++ b/.github/workflows/deploy-to-server.yml @@ -89,6 +89,13 @@ jobs: - name: 📥 检出代码 uses: actions/checkout@v4 + - name: 📦 确保 rsync 已安装 + run: | + if ! command -v rsync &>/dev/null; then + sudo apt-get update -qq && sudo apt-get install -y rsync + fi + rsync --version | head -1 + - name: 🔑 配置 SSH 连接 run: | mkdir -p ~/.ssh diff --git a/.github/workflows/generate-module-doc.yml b/.github/workflows/generate-module-doc.yml index e8de5d9e..15017793 100644 --- a/.github/workflows/generate-module-doc.yml +++ b/.github/workflows/generate-module-doc.yml @@ -49,7 +49,12 @@ jobs: echo "📋 文档无变化,跳过提交" else git commit -m "📋 自动更新 HoloLake Era 模块文档 · $(date -u +%Y-%m-%d\ %H:%M\ UTC)" - git push + git pull --rebase origin main || true + git push || { + echo "⚠️ 推送失败,尝试重新拉取后再推送..." + git pull --rebase origin main + git push + } fi notify-collaborator: diff --git a/.github/workflows/update-repo-map.yml b/.github/workflows/update-repo-map.yml index f2469e5a..fb1cb32b 100644 --- a/.github/workflows/update-repo-map.yml +++ b/.github/workflows/update-repo-map.yml @@ -34,4 +34,10 @@ jobs: git config user.email "zhuyuan@guanghulab.com" git add .github/brain/repo-map.json .github/brain/repo-snapshot.md git diff --cached --quiet || git commit -m "📚 铸渊图书馆目录更新 · $(date +%Y-%m-%dT%H:%M)" - git push + # 拉取远端最新更改后再推送,避免竞态条件 + git pull --rebase origin main || true + git push || { + echo "⚠️ 推送失败,尝试重新拉取后再推送..." + git pull --rebase origin main + git push + } diff --git a/m18-health-check b/m18-health-check deleted file mode 160000 index 4c5dc4e8..00000000 --- a/m18-health-check +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4c5dc4e8be2bcba1acee37c1bf93e18372ae4795 diff --git a/m18-health-check/README.md b/m18-health-check/README.md new file mode 100644 index 00000000..857abf66 --- /dev/null +++ b/m18-health-check/README.md @@ -0,0 +1,5 @@ +# M18 系统健康检查 +- 负责人:待分配 +- 状态:规划中 +- 技术栈:待定 +- 依赖模块:无 From 71a7789f0691f3e2be6b5eaf90de7c43743f4060 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Mar 2026 09:55:06 +0000 Subject: [PATCH 3/6] =?UTF-8?q?=E6=94=B9=E8=BF=9B=20rebase=20=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E5=A4=84=E7=90=86=EF=BC=9A=E6=9B=BF=E6=8D=A2=20||=20t?= =?UTF-8?q?rue=20=E4=B8=BA=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- .github/workflows/generate-module-doc.yml | 2 +- .github/workflows/update-repo-map.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-module-doc.yml b/.github/workflows/generate-module-doc.yml index 15017793..9c837b39 100644 --- a/.github/workflows/generate-module-doc.yml +++ b/.github/workflows/generate-module-doc.yml @@ -49,7 +49,7 @@ jobs: echo "📋 文档无变化,跳过提交" else git commit -m "📋 自动更新 HoloLake Era 模块文档 · $(date -u +%Y-%m-%d\ %H:%M\ UTC)" - git pull --rebase origin main || true + git pull --rebase origin main || echo "⚠️ rebase 失败(可能有冲突),尝试直接推送..." git push || { echo "⚠️ 推送失败,尝试重新拉取后再推送..." git pull --rebase origin main diff --git a/.github/workflows/update-repo-map.yml b/.github/workflows/update-repo-map.yml index fb1cb32b..b2104c70 100644 --- a/.github/workflows/update-repo-map.yml +++ b/.github/workflows/update-repo-map.yml @@ -35,7 +35,7 @@ jobs: git add .github/brain/repo-map.json .github/brain/repo-snapshot.md git diff --cached --quiet || git commit -m "📚 铸渊图书馆目录更新 · $(date +%Y-%m-%dT%H:%M)" # 拉取远端最新更改后再推送,避免竞态条件 - git pull --rebase origin main || true + git pull --rebase origin main || echo "⚠️ rebase 失败(可能有冲突),尝试直接推送..." git push || { echo "⚠️ 推送失败,尝试重新拉取后再推送..." git pull --rebase origin main From ff9867939ad9405edd5142f5617f99aa8f6f2c8b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Mar 2026 10:03:12 +0000 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=93=96=20=E6=9B=B4=E6=96=B0=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=8C=87=E5=8D=97=EF=BC=9A=E6=B7=BB=E5=8A=A0=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E6=B5=81=E7=A8=8B=E5=9B=BE=E5=92=8C=E5=BF=AB=E9=80=9F?= =?UTF-8?q?=E5=9B=9E=E7=AD=94=EF=BC=8C=E6=98=8E=E7=A1=AE=E3=80=8C=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E5=8D=B3=E9=83=A8=E7=BD=B2=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- docs/使用指南.md | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/docs/使用指南.md b/docs/使用指南.md index b69bae76..262c73c8 100644 --- a/docs/使用指南.md +++ b/docs/使用指南.md @@ -47,7 +47,33 @@ https://qinfendebingshuo.github.io/guanghulab/ 铸渊聊天室网站通过 GitHub Actions 自动部署。**只要代码合并到 `main` 分支,网站就会自动更新**。 -### 方法一:合并 PR(推荐) +> ### 🎯 快速回答:什么时候能看到新版本?需要手动操作什么? +> +> **你只需要做一件事:合并 PR。** 其他全部自动完成。 +> +> ``` +> 合并 PR → GitHub Actions 自动部署(1-3分钟)→ 刷新网页看到新版本 +> ``` +> +> **完整自动部署流程:** +> ``` +> 代码推送到功能分支 +> ↓ 自动触发 +> Staging 预演检查(模块完整性、安全检查) +> ↓ 检查通过 +> PR 等待冰朔合并 +> ↓ 冰朔点击 "Merge pull request"(唯一手动步骤) +> GitHub Actions 自动触发: +> ├── 🌀 GitHub Pages 部署(铸渊聊天室网站) +> ├── 🚀 CD 服务器部署(guanghulab.com) +> ├── 📚 图书馆目录自动更新 +> ├── 📋 模块文档自动生成 +> └── 📡 Notion 部署通知 +> ↓ 1-3 分钟后 +> 网站自动更新完成 ✅ +> ``` + +### 方法一:合并 PR(推荐 · 唯一需要手动操作的步骤) 当 Copilot Agent 或开发者在功能分支(如 `copilot/xxx`)上完成修改后: @@ -131,6 +157,17 @@ https://qinfendebingshuo.github.io/guanghulab/ ## 五、常见问题 +### Q: 什么时候能看到新模块/新版本上线? +- **PR 合并到 main 后 1-3 分钟**即可看到新版本 +- 如果代码还在功能分支(PR 未合并),网站不会更新 +- 合并后刷新 `https://qinfendebingshuo.github.io/guanghulab/` 即可 +- 服务器部署(guanghulab.com)同样会在合并后自动触发 + +### Q: 我还需要手动操作什么吗? +- **只需要一步:合并 PR**(点击绿色的 "Merge pull request" 按钮) +- 部署、通知、文档更新全部自动完成,无需其他操作 +- 如果部署后有问题,可以在 Issue 中评论「启动冰朔人格体」进行自动诊断 + ### Q: 铸渊聊天室打不开? - 确认网址正确:`https://qinfendebingshuo.github.io/guanghulab/` - 不要在后面加 `/docs/index.html` From 6971d93a871b5430e2893bc67e6969208bae2c18 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Mar 2026 10:21:41 +0000 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=8C=90=20=E6=98=8E=E7=A1=AE=20guanghu?= =?UTF-8?q?lab.com=20=3D=20GitHub=20Pages=20=E9=83=A8=E7=BD=B2=20+=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=9C=E7=A8=8B=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=20rsync=20=E5=AE=89=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- .github/workflows/deploy-to-server.yml | 12 ++++++++- docs/使用指南.md | 34 +++++++++++++++++--------- 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy-to-server.yml b/.github/workflows/deploy-to-server.yml index 06b50f4e..2ff4efbc 100644 --- a/.github/workflows/deploy-to-server.yml +++ b/.github/workflows/deploy-to-server.yml @@ -89,7 +89,7 @@ jobs: - name: 📥 检出代码 uses: actions/checkout@v4 - - name: 📦 确保 rsync 已安装 + - name: 📦 确保本地 rsync 已安装 run: | if ! command -v rsync &>/dev/null; then sudo apt-get update -qq && sudo apt-get install -y rsync @@ -103,6 +103,16 @@ jobs: chmod 600 ~/.ssh/deploy_key ssh-keyscan -H ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts 2>/dev/null + - name: 📦 确保远程服务器 rsync 已安装 + run: | + echo "🔍 检查远程服务器 rsync..." + ssh -i ~/.ssh/deploy_key ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} \ + "command -v rsync || { echo '⚠️ 远程服务器未安装 rsync,尝试安装...' && \ + (sudo apt-get update -qq && sudo apt-get install -y rsync 2>/dev/null || \ + sudo yum install -y rsync 2>/dev/null || \ + echo '❌ 无法自动安装 rsync,请手动在服务器上安装: sudo apt-get install rsync'); }" + echo "✅ 远程服务器 rsync 检查完成" + - name: 🔒 部署前安全检查 run: | if [ ! -f "docs/index.html" ]; then diff --git a/docs/使用指南.md b/docs/使用指南.md index 262c73c8..cf95ab1f 100644 --- a/docs/使用指南.md +++ b/docs/使用指南.md @@ -4,12 +4,19 @@ ## 一、网址 -铸渊聊天室部署在 GitHub Pages 上,**正确网址**: +铸渊聊天室部署在 GitHub Pages 上,通过自定义域名访问: +``` +https://guanghulab.com/ +``` + +备用网址(GitHub Pages 默认): ``` https://qinfendebingshuo.github.io/guanghulab/ ``` +> 💡 两个网址指向同一个网站。`guanghulab.com` 通过 `docs/CNAME` 配置,由 GitHub Pages 提供服务。 +> > ⚠️ 旧网址 `…/docs/index.html` 已失效(系统重构后路径变了),请用上面的新网址。 打开后你会看到铸渊助手的登录界面(v5.0),有两种登录方式: @@ -45,14 +52,14 @@ https://qinfendebingshuo.github.io/guanghulab/ ## 三、如何部署新版本到网站(⭐ 重要) -铸渊聊天室网站通过 GitHub Actions 自动部署。**只要代码合并到 `main` 分支,网站就会自动更新**。 +铸渊聊天室网站通过 GitHub Actions 自动部署。**只要代码合并到 `main` 分支,guanghulab.com 就会自动更新**。 -> ### 🎯 快速回答:什么时候能看到新版本?需要手动操作什么? +> ### 🎯 快速回答:guanghulab.com 合并 PR 就能部署吗? > -> **你只需要做一件事:合并 PR。** 其他全部自动完成。 +> **是的,合并 PR 就行。** guanghulab.com 由 GitHub Pages 提供服务,合并后 1-3 分钟自动更新。 > > ``` -> 合并 PR → GitHub Actions 自动部署(1-3分钟)→ 刷新网页看到新版本 +> 合并 PR → GitHub Actions 自动部署(1-3分钟)→ 刷新 guanghulab.com 看到新版本 > ``` > > **完整自动部署流程:** @@ -64,13 +71,13 @@ https://qinfendebingshuo.github.io/guanghulab/ > PR 等待冰朔合并 > ↓ 冰朔点击 "Merge pull request"(唯一手动步骤) > GitHub Actions 自动触发: -> ├── 🌀 GitHub Pages 部署(铸渊聊天室网站) -> ├── 🚀 CD 服务器部署(guanghulab.com) +> ├── 🌀 GitHub Pages 部署 → guanghulab.com 更新 +> ├── 🚀 CD 服务器部署(状态看板同步) > ├── 📚 图书馆目录自动更新 > ├── 📋 模块文档自动生成 > └── 📡 Notion 部署通知 > ↓ 1-3 分钟后 -> 网站自动更新完成 ✅ +> guanghulab.com 自动更新完成 ✅ > ``` ### 方法一:合并 PR(推荐 · 唯一需要手动操作的步骤) @@ -157,11 +164,16 @@ https://qinfendebingshuo.github.io/guanghulab/ ## 五、常见问题 +### Q: guanghulab.com 合并 PR 就能自动部署吗? +- **是的。** `guanghulab.com` 由 GitHub Pages 提供服务(通过 `docs/CNAME` 配置) +- 合并 PR 到 main 后,`deploy-pages.yml` 自动将 `docs/` 部署到 GitHub Pages +- GitHub Pages 自动为 `guanghulab.com` 域名提供服务 +- **1-3 分钟后刷新 guanghulab.com 即可看到新版本** + ### Q: 什么时候能看到新模块/新版本上线? - **PR 合并到 main 后 1-3 分钟**即可看到新版本 - 如果代码还在功能分支(PR 未合并),网站不会更新 -- 合并后刷新 `https://qinfendebingshuo.github.io/guanghulab/` 即可 -- 服务器部署(guanghulab.com)同样会在合并后自动触发 +- 合并后刷新 `https://guanghulab.com/` 即可 ### Q: 我还需要手动操作什么吗? - **只需要一步:合并 PR**(点击绿色的 "Merge pull request" 按钮) @@ -169,7 +181,7 @@ https://qinfendebingshuo.github.io/guanghulab/ - 如果部署后有问题,可以在 Issue 中评论「启动冰朔人格体」进行自动诊断 ### Q: 铸渊聊天室打不开? -- 确认网址正确:`https://qinfendebingshuo.github.io/guanghulab/` +- 确认网址正确:`https://guanghulab.com/` 或 `https://qinfendebingshuo.github.io/guanghulab/` - 不要在后面加 `/docs/index.html` - 等几分钟再刷新(部署有延迟) - 按 `Ctrl+Shift+R` 强制刷新,清除缓存 From d001e8d70462ed101da26975c4cb6a92420036c0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Mar 2026 10:22:22 +0000 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20rsync=20=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E9=94=99=E8=AF=AF=E6=B6=88=E6=81=AF=EF=BC=9A=E8=A1=A5?= =?UTF-8?q?=E5=85=85=20yum=20=E5=92=8C=20sudo=20=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- .github/workflows/deploy-to-server.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-to-server.yml b/.github/workflows/deploy-to-server.yml index 2ff4efbc..025e2497 100644 --- a/.github/workflows/deploy-to-server.yml +++ b/.github/workflows/deploy-to-server.yml @@ -110,7 +110,9 @@ jobs: "command -v rsync || { echo '⚠️ 远程服务器未安装 rsync,尝试安装...' && \ (sudo apt-get update -qq && sudo apt-get install -y rsync 2>/dev/null || \ sudo yum install -y rsync 2>/dev/null || \ - echo '❌ 无法自动安装 rsync,请手动在服务器上安装: sudo apt-get install rsync'); }" + { echo '❌ 无法自动安装 rsync(可能缺少 sudo 权限)'; \ + echo '请手动在服务器上安装: sudo apt-get install rsync 或 sudo yum install rsync'; \ + exit 1; }); }" echo "✅ 远程服务器 rsync 检查完成" - name: 🔒 部署前安全检查