79 lines
2.3 KiB
YAML
79 lines
2.3 KiB
YAML
name: "[docs]"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
env:
|
|
RUST_TOOLCHAIN: stable
|
|
TOOLCHAIN_PROFILE: minimal
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout the code
|
|
uses: actions/checkout@v7
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: ${{ env.RUST_TOOLCHAIN }}
|
|
- name: Verify curated LLM docs (llms.txt / llms-full.txt) against docs tree
|
|
run: cargo run -p xtask -- llms-check
|
|
- name: Compile the docs example app (verified-docs spine)
|
|
run: cargo build --manifest-path examples/demo/Cargo.toml
|
|
- name: Install zola
|
|
uses: taiki-e/install-action@v2
|
|
with:
|
|
tool: zola@0.21.0
|
|
- name: Build the docs site (fails on broken internal links)
|
|
run: zola build
|
|
working-directory: docs-site
|
|
- run: cargo install snipdoc --features exec
|
|
- run: snipdoc check
|
|
continue-on-error: true
|
|
env:
|
|
SNIPDOC_SKIP_EXEC_COMMANDS: true
|
|
|
|
# Builds the deployed site (Astro/Starlight in website/). The `check` job
|
|
# above still verifies the docs *source* (docs-site/, snipdoc, llms-check);
|
|
# this job verifies the artifact that actually ships to loco.rs.
|
|
website:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout the code
|
|
uses: actions/checkout@v7
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
# The site lives in website/; read its packageManager pin, since
|
|
# there is no root package.json.
|
|
package_json_file: website/package.json
|
|
- name: Install Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
cache-dependency-path: website/pnpm-lock.yaml
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
working-directory: website
|
|
- name: Unit tests (migration / link-rewrite scripts)
|
|
run: pnpm test
|
|
working-directory: website
|
|
- name: Build the Astro site (fails on broken links)
|
|
run: pnpm build
|
|
working-directory: website
|
|
- name: URL parity (old loco.rs URLs still resolve)
|
|
run: |
|
|
pnpm url-parity
|
|
pnpm url-parity-blog
|
|
working-directory: website
|