mirror of
https://github.com/openmlsys/openmlsys-zh.git
synced 2026-04-24 18:43:03 +08:00
ci: use peaceiris action for mdbook
Replace manual mdBook installation in CI and Pages workflows with peaceiris/actions-mdbook@v2 and keep a regression test to ensure the action stays in use.
This commit is contained in:
22
.github/workflows/main.yml
vendored
22
.github/workflows/main.yml
vendored
@@ -18,13 +18,10 @@ jobs:
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install Rust toolchain
|
||||
run: |
|
||||
curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Install mdBook
|
||||
run: cargo install mdbook --locked
|
||||
- name: Setup mdBook
|
||||
uses: peaceiris/actions-mdbook@v2
|
||||
with:
|
||||
mdbook-version: 'latest'
|
||||
|
||||
- name: Run mdBook regression tests
|
||||
run: |
|
||||
@@ -48,14 +45,11 @@ jobs:
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install Rust toolchain
|
||||
run: |
|
||||
curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Install mdBook
|
||||
run: cargo install mdbook --locked
|
||||
- name: Setup mdBook
|
||||
uses: peaceiris/actions-mdbook@v2
|
||||
with:
|
||||
mdbook-version: 'latest'
|
||||
|
||||
- name: Build Chinese HTML with mdBook
|
||||
run: bash build_mdbook_zh.sh
|
||||
|
||||
11
.github/workflows/update_docs.yml
vendored
11
.github/workflows/update_docs.yml
vendored
@@ -29,13 +29,10 @@ jobs:
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install Rust toolchain
|
||||
run: |
|
||||
curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Install mdBook
|
||||
run: cargo install mdbook --locked
|
||||
- name: Setup mdBook
|
||||
uses: peaceiris/actions-mdbook@v2
|
||||
with:
|
||||
mdbook-version: 'latest'
|
||||
|
||||
- name: Run mdBook regression tests
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user