fix(workflow): 修复文档发布工作流配置

- 修正了 if 条件的位置以确保正确触发
- 保持了标签发布和提交消息触发的功能
- 优化了工作流语法结构
- [release doc]
This commit is contained in:
GeWuYou 2026-02-03 08:18:17 +08:00
parent 8f388d4a9e
commit f2b5711fc1

View File

@ -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