ci(文档部署): 在文档构建流程中添加 Rust 工具链安装步骤
Some checks failed
Build and Deploy Dao OS Docs / build-and-deploy (push) Failing after 2m25s
Some checks failed
Build and Deploy Dao OS Docs / build-and-deploy (push) Failing after 2m25s
由于 mdBook 需要 Rust 工具链支持,新增了安装 Rust 稳定版工具链的步骤。这样可以确保构建环境具备必要的依赖,同时使用最小化配置以加快安装速度。
This commit is contained in:
@@ -12,9 +12,17 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4 # 使用最新的 checkout action
|
uses: actions/checkout@v4 # 使用最新的 checkout action
|
||||||
|
|
||||||
|
# 新增:安装 Rust 工具链
|
||||||
|
- name: Setup Rust toolchain
|
||||||
|
uses: actions-rs/toolchain@v1 # 使用 actions-rs/toolchain 来安装 Rust
|
||||||
|
with:
|
||||||
|
toolchain: stable # 安装稳定版 Rust
|
||||||
|
profile: minimal # 安装最小化配置文件,只包含 cargo 和 rustc,下载更快
|
||||||
|
override: true # 确保这个 Rust 版本被设置为默认
|
||||||
|
|
||||||
- name: Install mdBook
|
- name: Install mdBook
|
||||||
run: |
|
run: |
|
||||||
RUSTUP_TOOLCHAIN=stable cargo install mdbook --locked --no-default-features # 只安装 mdbook,不安装额外特性以加速
|
cargo install mdbook --locked --no-default-features # 只安装 mdbook,不安装额外特性以加速
|
||||||
|
|
||||||
- name: Build mdBook
|
- name: Build mdBook
|
||||||
run: mdbook build # 构建文档到默认的 'book' 目录
|
run: mdbook build # 构建文档到默认的 'book' 目录
|
||||||
|
|||||||
Reference in New Issue
Block a user