From f2b5711fc149646a824eea63648c691e45c1824f Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Tue, 3 Feb 2026 08:18:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(workflow):=20=E4=BF=AE=E5=A4=8D=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E5=8F=91=E5=B8=83=E5=B7=A5=E4=BD=9C=E6=B5=81=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修正了 if 条件的位置以确保正确触发 - 保持了标签发布和提交消息触发的功能 - 优化了工作流语法结构 - [release doc] --- .github/workflows/publish-docs.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index bd439ad..6225819 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -37,15 +37,13 @@ concurrency: # 2. contains(github.event.head_commit.message, '[release doc]'):检查提交信息中是否包含 '[release doc]' 字符串。 # 若任一条件满足,则执行该作业。 jobs: - if: | - startsWith(github.ref, 'refs/tags/') - || contains(github.event.head_commit.message, '[release doc]') - # 作业名称:publish-docs,负责构建和发布文档。 publish-docs: + if: | + startsWith(github.ref, 'refs/tags/') + || contains(github.event.head_commit.message, '[release doc]') # 运行环境:使用最新版本的 Ubuntu 虚拟机。 runs-on: ubuntu-latest - # 环境配置:指定部署的目标环境为 github-pages,并设置页面 URL。 environment: name: github-pages