Skip to content

Commit a4a95d9

Browse files
committed
feat: 修正发布报错
1 parent bf55d96 commit a4a95d9

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,25 @@ jobs:
2121
steps:
2222
# 1. 安装依赖
2323
- uses: actions/checkout@v4
24+
25+
- name: Cache cargo registry
26+
uses: actions/cache@v3
27+
with:
28+
path: ~/.cargo/registry
29+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
30+
31+
- name: Cache cargo index
32+
uses: actions/cache@v3
33+
with:
34+
path: ~/.cargo/git
35+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
36+
37+
- name: Cache cargo build
38+
uses: actions/cache@v3
39+
with:
40+
path: ~/.cargo/bin
41+
key: ${{ runner.os }}-cargo-bin-mdbook-typst-pdf-${{ env.MDBOOK_TYPST_PDF_VERSION }}
42+
2443
- name: Install Rust
2544
run: |
2645
rustup set profile minimal
@@ -38,9 +57,7 @@ jobs:
3857
echo "$(pwd)/bin" >> "${GITHUB_PATH}"
3958
4059
- name: Install mdbook-typst-pdf
41-
run: |
42-
curl -sSL https://github.com/KaiserY/mdbook-typst-pdf/releases/download/v${MDBOOK_TYPST_PDF_VERSION}/mdbook-typst-pdf-v${MDBOOK_TYPST_PDF_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
43-
echo "$(pwd)/bin" >> "${GITHUB_PATH}"
60+
run: cargo install mdbook-typst-pdf --version ${MDBOOK_TYPST_PDF_VERSION}
4461

4562
# 2. 编译
4663
- name: Build book

0 commit comments

Comments
 (0)