From 21ecd238d0974d800f1d3e83a808af3fe2d88252 Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Wed, 11 Feb 2026 13:10:55 +0800 Subject: [PATCH 1/3] =?UTF-8?q?chore(workflow):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=8F=91=E5=B8=83=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改标签匹配模式从 '*' 到 'v*' 以确保版本标签格式一致性 - 添加条件判断逻辑以精确控制工作流触发时机 - 增加对预发布标签的过滤处理 - 为手动文档发布增加分支合并条件支持 --- .github/workflows/publish-docs.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index f84bdadd..42d7495c 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -5,7 +5,7 @@ name: Publish Docs on: push: tags: - - '*' + - 'v*' permissions: contents: read pages: write @@ -17,6 +17,9 @@ concurrency: jobs: build-and-deploy: + if: | + (startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')) + || (github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[release doc]')) runs-on: ubuntu-latest environment: From b5caeedce50e39d2b63cb194bd4d6e66b6c17be0 Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Wed, 11 Feb 2026 13:27:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?chore(ci):=20=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E5=8F=91=E5=B8=83=E5=B7=A5=E4=BD=9C=E6=B5=81=E4=BB=A5?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20Bun.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 Node.js 设置替换为 Bun.js 安装 - 更新依赖安装命令从 npm 到 bun - 更新构建命令从 npm run build 到 bun run build - 移除缓存配置选项 --- .github/workflows/publish-docs.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 42d7495c..39b2eb2b 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -31,24 +31,20 @@ jobs: - name: Checkout uses: actions/checkout@v4 - # 2️⃣ 安装 Node.js - - name: Setup Node - uses: actions/setup-node@v4 + # 2️⃣ 安装 Bun.js + - uses: oven-sh/setup-bun@v2 with: - node-version: 20 - cache: 'npm' - + bun-version: latest # 3️⃣ 安装依赖 - name: Install Dependencies run: | cd docs - npm install - + bun install # 4️⃣ 构建 VitePress - name: Build VitePress run: | cd docs - npm run build + bun run build # 5️⃣ 上传构建产物 - name: Upload Pages Artifact From cd25fa0b458e36d6de699601dd1d13bbde808ef3 Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Wed, 11 Feb 2026 13:31:14 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix(workflow):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=8F=91=E5=B8=83=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E5=B9=B6=E6=8C=87=E5=AE=9ABun=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复了触发文档发布的条件逻辑 - 指定Bun.js版本为2.1.x以确保兼容性 - 移除了不必要的分支检查条件 --- .github/workflows/publish-docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 39b2eb2b..b53ba322 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -19,7 +19,7 @@ jobs: build-and-deploy: if: | (startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')) - || (github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[release doc]')) + || contains(github.event.head_commit.message, '[release doc]')) runs-on: ubuntu-latest environment: @@ -34,7 +34,7 @@ jobs: # 2️⃣ 安装 Bun.js - uses: oven-sh/setup-bun@v2 with: - bun-version: latest + bun-version: 2.1.x # 3️⃣ 安装依赖 - name: Install Dependencies run: |