Skip to content

chore: make clippy happy #872

chore: make clippy happy

chore: make clippy happy #872

Workflow file for this run

name: Book
on:
push:
branches:
- master
- release/*
paths:
- 'book/**'
- '**.rs'
- '**/Cargo.*'
- '.github/workflows/book.yml'
- '**.pi'
- '**/Kagari.*'
jobs:
book:
name: Book
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: '0.4.24'
MDBOOK_LINKCHECK_VERSION: '0.7.4'
MDBOOK_MERMAID_VERSION: '0.8.3'
MDBOOK_ADMONISH_VERSION: '1.8.0'
MDBOOK_TOC_VERSION: '0.11.0'
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install mdbook
run: |
curl -L https://github.com/rust-lang/mdBook/releases/download/v$MDBOOK_VERSION/mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/.cargo/bin
curl -L https://github.com/badboy/mdbook-mermaid/releases/download/v$MDBOOK_MERMAID_VERSION/mdbook-mermaid-v$MDBOOK_MERMAID_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/.cargo/bin
curl -L https://github.com/tommilligan/mdbook-admonish/releases/download/v$MDBOOK_ADMONISH_VERSION/mdbook-admonish-v$MDBOOK_ADMONISH_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/.cargo/bin
curl -L https://github.com/badboy/mdbook-toc/releases/download/$MDBOOK_TOC_VERSION/mdbook-toc-$MDBOOK_TOC_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/.cargo/bin
curl -L https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v$MDBOOK_LINKCHECK_VERSION/mdbook-linkcheck.v$MDBOOK_LINKCHECK_VERSION.x86_64-unknown-linux-gnu.zip -O
unzip mdbook-linkcheck.v$MDBOOK_LINKCHECK_VERSION.x86_64-unknown-linux-gnu.zip -d ~/.cargo/bin
chmod +x ~/.cargo/bin/mdbook-linkcheck
- name: Build
run: |
mdbook build
working-directory: book
- uses: actions/upload-artifact@v3
with:
name: book
path: book/book
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: book
if: github.event_name == 'push'
steps:
- uses: actions/download-artifact@v3
with:
name: book
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .
- uses: Pivot-Studio/action-qiniu-upload@master
with:
# Your qiniu access key, required.
access_key: ${{ secrets.QINIU_ACCESS_KEY }}
# Your qiniu secret key, required.
secret_key: ${{ secrets.QINIU_SECRET_KEY }}
# Bucket name, required.
bucket: ${{ secrets.QINIU_BUCKET }}
# The local directory (or file) you want to upload to bucket.
# Default: './'
source_dir: './'
# The directory inside of the bucket you want to upload to, namely key prefix prepended to dest file key.
# Default: '/'
dest_dir: '/docs'
# Whether to ignore source maps.
# Default: true
ignore_source_map: true
refresh_dirs: '["https://pivotlang.tech/docs/"]'