From 41419ad8f562c4bcf94026550a5b2dd4054bf766 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 10:52:43 +0000 Subject: [PATCH] fix: sync PR #361 UI redesign to server/sites/portal and add auto-sync step in deploy workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause: deploy-to-zhuyuan-server.yml uses server/sites/portal/ (not docs/) as the frontend source for guanghulab.online. PR #361 only updated docs/index.html, so the server never received the new UI. Fix: 1. Copied docs/index.html → server/sites/portal/index.html (immediate fix) 2. Added '🔄 同步 docs → portal' step in deploy workflow to auto-sync docs/index.html to server/sites/portal/ before every deployment, preventing this desync from happening again. Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/da023482-75f7-46b3-a921-548ce02a3a83 Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- .../workflows/deploy-to-zhuyuan-server.yml | 10 ++ server/sites/portal/index.html | 146 ++++++++++++------ 2 files changed, 110 insertions(+), 46 deletions(-) diff --git a/.github/workflows/deploy-to-zhuyuan-server.yml b/.github/workflows/deploy-to-zhuyuan-server.yml index 286edf22..15a0eb1a 100644 --- a/.github/workflows/deploy-to-zhuyuan-server.yml +++ b/.github/workflows/deploy-to-zhuyuan-server.yml @@ -181,6 +181,16 @@ jobs: server/age-os/package.json \ ${{ secrets.ZY_SERVER_USER }}@${{ secrets.ZY_SERVER_HOST }}:/opt/age-os/ + - name: 🔄 同步 docs → portal (单一数据源保障) + run: | + # docs/index.html 是 GitHub Pages 的数据源 + # server/sites/portal/ 是服务器部署的数据源 + # 自动同步确保两者一致,防止修改 docs/ 后服务器未更新 + if [ -f "docs/index.html" ] && [ -d "server/sites/portal" ]; then + cp docs/index.html server/sites/portal/index.html + echo "✅ docs/index.html → server/sites/portal/index.html 已同步" + fi + - name: 🌐 同步前端内容到站点 run: | # Push事件: 直接部署到 production (guanghulab.online = ZY_DOMAIN_MAIN = production) diff --git a/server/sites/portal/index.html b/server/sites/portal/index.html index e66684a1..7c34b7a0 100644 --- a/server/sites/portal/index.html +++ b/server/sites/portal/index.html @@ -8,7 +8,7 @@ 光湖语言世界 · HoloLake - +