From b0bf5742b1a1890fc9c0a1af7010656f9feafee2 Mon Sep 17 00:00:00 2001 From: Yinzuo Jiang Date: Mon, 5 Aug 2024 19:03:49 +0800 Subject: [PATCH] build: update book.toml --- .github/workflows/ci.yml | 12 +++++------- .github/workflows/deploy.yml | 14 ++++++-------- book.toml | 4 ++-- "doc/\346\225\260\345\255\246.md" | 2 +- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20192e1..a6e46f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,12 +12,10 @@ jobs: rustup set profile minimal rustup toolchain install stable rustup default stable - - name: Install latest mdbook - run: | - tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') - url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" - mkdir bin - curl -sSL $url | tar -xz --directory=bin - echo "$(pwd)/bin" >> $GITHUB_PATH + - name: Install mdbook and plugins + uses: actions-rs/cargo@v1 + with: + command: install + args: mdbook mdbook-toc - name: Run tests run: mdbook test diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 253fcc7..7a1b5ca 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ name: Deploy on: push: branches: - - main + - master jobs: deploy: @@ -15,13 +15,11 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install latest mdbook - run: | - tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') - url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" - mkdir mdbook - curl -sSL $url | tar -xz --directory=./mdbook - echo `pwd`/mdbook >> $GITHUB_PATH + - name: Install mdbook and plugins + uses: actions-rs/cargo@v1 + with: + command: install + args: mdbook mdbook-toc - name: Build Book run: | # This assumes your book is in the root of your repository. diff --git a/book.toml b/book.toml index f3cd03b..bcd3d28 100644 --- a/book.toml +++ b/book.toml @@ -1,9 +1,9 @@ [book] -authors = ["ChiangYintso"] +authors = ["Yinzuo Jiang"] language = "en" multilingual = false src = "doc" -title = "ICPC wiki" +title = "Algorithms" [output.html] mathjax-support = true diff --git "a/doc/\346\225\260\345\255\246.md" "b/doc/\346\225\260\345\255\246.md" index 1912200..b377d81 100644 --- "a/doc/\346\225\260\345\255\246.md" +++ "b/doc/\346\225\260\345\255\246.md" @@ -49,7 +49,7 @@ long long fast_pow(long long base, long long idx, long long mod) { (不可用!) -``` +```c++ // // Created by Jiang Yinzuo on 2020/12/12. //