mirror of
https://github.com/rust-lang-cn/book-cn.git
synced 2025-01-23 07:20:20 +08:00
main.yml
This commit is contained in:
parent
4c2ca525bc
commit
88604b04e5
22
.github/workflows/main.yml
vendored
22
.github/workflows/main.yml
vendored
@ -12,12 +12,12 @@ jobs:
|
||||
- name: Install Rust
|
||||
run: |
|
||||
rustup set profile minimal
|
||||
rustup toolchain install 1.52 -c rust-docs
|
||||
rustup default 1.52
|
||||
rustup toolchain install 1.57 -c rust-docs
|
||||
rustup default 1.57
|
||||
- name: Install mdbook
|
||||
run: |
|
||||
mkdir bin
|
||||
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.5/mdbook-v0.4.5-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
|
||||
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
|
||||
echo "$(pwd)/bin" >> ${GITHUB_PATH}
|
||||
- name: Report versions
|
||||
run: |
|
||||
@ -41,13 +41,21 @@ jobs:
|
||||
- name: Install mdbook
|
||||
run: |
|
||||
mkdir bin
|
||||
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.5/mdbook-v0.4.5-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
|
||||
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
|
||||
echo "$(pwd)/bin" >> ${GITHUB_PATH}
|
||||
- name: Install aspell
|
||||
run: sudo apt install aspell
|
||||
- name: Install shellcheck
|
||||
run: sudo apt install shellcheck
|
||||
- name: Report versions
|
||||
run: |
|
||||
rustup --version
|
||||
rustc -Vv
|
||||
mdbook --version
|
||||
aspell --version
|
||||
shellcheck --version
|
||||
- name: Shellcheck
|
||||
run: find . -name '*.sh' | xargs shellcheck
|
||||
- name: Spellcheck
|
||||
run: bash ci/spellcheck.sh list
|
||||
- name: Lint for local file paths
|
||||
@ -56,3 +64,9 @@ jobs:
|
||||
cargo run --bin lfp src
|
||||
- name: Validate references
|
||||
run: bash ci/validate.sh
|
||||
- name: Check for broken links
|
||||
run: |
|
||||
curl -sSLo linkcheck.sh \
|
||||
https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
|
||||
# Cannot use --all here because of the generated redirect pages aren't available.
|
||||
sh linkcheck.sh book
|
||||
|
Loading…
Reference in New Issue
Block a user