Skip to content

docs: fix cli args

docs: fix cli args #5

Workflow file for this run

name: shiroa::gh_pages
on:
# Runs on pushes targeting the default branch
push:
branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
pages: write
id-token: write
contents: read
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
build-gh-pages:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
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 Rust
uses: dtolnay/rust-toolchain@stable
- name: Set Node.js 22.x
uses: actions/setup-node@v3
with:
node-version: 22.x
- name: Install Artifact Cache
uses: Swatinem/rust-cache@v2
- name: Build Book (Paged Target)
run: |
cargo run --release --bin shiroa -- build --font-path assets/fonts --path-to-root /shiroa/paged/ -w . github-pages/docs
mv ./github-pages/dist/ ./github-pages/dist-paged/
mkdir -p ./github-pages/dist/
mv ./github-pages/dist-paged ./github-pages/dist/paged
- name: Build Book
run: |
cargo run --release --bin shiroa -- build --font-path assets/fonts --path-to-root /shiroa/ -w . github-pages/docs --mode static-html
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload `/github-pages` sub directory
path: './github-pages/dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4