Skip to content

docs: fix cli args

docs: fix cli args #6

Workflow file for this run

name: shiroa::ci
on: [push, pull_request]
env:
RUSTFLAGS: '-Dwarnings'
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Download Repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download font assets
run: |
mkdir -p assets/fonts
curl -L https://github.com/Myriad-Dreamin/shiroa/releases/download/v0.1.0/charter-font-assets.tar.gz | tar -xvz -C assets/fonts/
curl -L https://github.com/Myriad-Dreamin/shiroa/releases/download/v0.1.5/source-han-serif-font-assets.tar.gz | tar -xvz -C assets/fonts/
- name: Install Tinymist
env:
TINYMIST_VERRION: v0.14.0-rc1
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/Myriad-Dreamin/tinymist/releases/download/${TINYMIST_VERRION}/tinymist-installer.sh | sh
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt,clippy
- name: Install Typst
uses: typst-community/setup-typst@v4
- name: Install Artifact Cache
uses: Swatinem/rust-cache@v2
- name: Fmt check
run: cargo fmt --check --all
- name: Clippy check
run: cargo clippy --workspace --all-targets
- name: Documentation check
run: cargo doc --workspace --no-deps
- name: Build
run: |
cargo build --release --workspace
- name: Build Book
run: |
cargo run --release --bin shiroa -- build --path-to-root /shiroa/ -w . github-pages/docs
- name: Build Book (HTML Target)
run: |
cargo run --release --bin shiroa -- build --path-to-root /shiroa/ -w . github-pages/docs --mode static-html
- name: Test (Rust)
run: cargo test --workspace --no-fail-fast
- name: Test (Typst)
run: tinymist test packages/shiroa-tests/main.typ --root . --ignore-system-fonts --font-path ./assets/fonts/ --coverage --print-coverage=full
- name: Test CLI
run: /usr/bin/timeout 10s cargo run --release --bin shiroa -- init test-book || true
- name: Test CLI (Build Paged)
run: cargo run --release --bin shiroa -- build test-book
- name: Test CLI (Build Html)
run: cargo run --release --bin shiroa -- build --mode static-html test-book
- name: Test CLI (Build Pdf)
run: typst compile test-book/ebook.typ
- name: Test CLI (Build Paged Minimal)
run: cargo run --release --bin shiroa -- build
working-directory: tests/minimal
- name: Test CLI (Build Html Minimal)
run: cargo run --release --bin shiroa -- build --mode static-html
working-directory: tests/minimal