GFramework/.github/workflows/publish-docs.yml
GeWuYou 93b25a19f7 docs(core): 更新命令系统文档并移除控制器独立文档
- 移除 controller.md 文件,将控制器相关内容整合到其他文档中
- 重构 command.md 文档,更新命令基类的类型参数设计
- 添加新的命令基类 AbstractCommand<TInput> 和 AbstractCommand<TInput, TResult>
- 更新命令使用示例,采用输入参数对象替代构造函数参数
- 优化事件注册相关代码示例,移除 Godot 特定的生命周期方法
- 更新依赖注入容器文档,明确 Register 方法的泛型特性
- 添加模型异步初始化功能说明和相关接口介绍
- 重构查询系统文档,统一采用输入参数对象的设计模式
- 更新架构生命周期枚举值,使用更准确的阶段名称
- 添加 GitHub Actions 工作流配置,集成 LLM 准备的文档索引功能
2026-02-12 13:13:07 +08:00

86 lines
2.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 工作流名称Publish Docs
# 该工作流用于在推送标签或手动触发时构建并部署文档到 GitHub Pages
name: Publish Docs
# 触发条件配置
# 当推送以 'v' 开头的标签时触发,或者通过 GitHub UI 手动触发
on:
push:
tags:
- 'v*'
workflow_dispatch:
# 权限配置
# 配置工作流所需的权限:
# - contents: read读取仓库内容
# - pages: write写入 GitHub Pages
# - id-token: write写入身份令牌
permissions:
contents: read
pages: write
id-token: write
# 并发控制配置
# 设置并发组为 "pages",并且不允许取消正在进行的任务
concurrency:
group: pages
cancel-in-progress: false
# 定义工作流中的任务
jobs:
# 构建和部署任务
build-and-deploy:
# 条件判断:仅当推送的是正式版本标签(不包含预发布标识)或手动触发时执行
if: |
(startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-'))
|| github.event_name == 'workflow_dispatch'
# 指定运行环境为最新版 Ubuntu
runs-on: ubuntu-latest
# 环境配置
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# 步骤定义
steps:
# 检出代码
- name: Checkout
uses: actions/checkout@v4
# 安装 Bun 运行时
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
cache: true
# 安装项目依赖
- name: Install Dependencies
working-directory: docs
run: bun install
# 构建 VitePress 文档
- name: Build VitePress
working-directory: docs
run: bun run build
# 生成 LLM 索引文件
- name: Make docs LLM ready
uses: demodrive-ai/llms-txt-action@v1
with:
docs-path: docs/.vitepress/dist
# 上传构建产物作为 Pages 部署工件
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist
# 将文档部署到 GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4