zeph 0.18.3

Lightweight AI agent with hybrid inference, skills-first architecture, and multi-channel I/O
name: Docs

on:
  push:
    branches: [main]
    paths: [book/**, README.md, "crates/*/README.md", ".github/lychee.toml", ".github/workflows/docs.yml"]
  pull_request:
    paths: [book/**, README.md, "crates/*/README.md", ".github/lychee.toml", ".github/workflows/docs.yml"]
  schedule:
    - cron: "0 6 * * 1"  # every Monday 06:00 UTC
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: pages-${{ github.ref }}
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: Install mdBook
        run: |
          mkdir -p $HOME/.local/bin
          curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.5.2/mdbook-v0.5.2-x86_64-unknown-linux-gnu.tar.gz \
            | tar xz -C $HOME/.local/bin
          echo "$HOME/.local/bin" >> $GITHUB_PATH
      - name: Build
        run: mdbook build book
      - uses: actions/configure-pages@v5
        if: github.ref == 'refs/heads/main'
      - uses: actions/upload-pages-artifact@v4
        if: github.ref == 'refs/heads/main'
        with:
          path: book/book

  link-check:
    name: Check links (lychee)
    runs-on: ubuntu-latest
    timeout-minutes: 5
    steps:
      - uses: actions/checkout@v6
      - uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2
        with:
          args: "--config .github/lychee.toml README.md crates/*/README.md book/src/**/*.md --offline --no-progress"
          fail: true

  link-check-external:
    name: Check external links (lychee)
    if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v6
      - uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2
        with:
          args: >-
            --config .github/lychee.toml
            --cache
            --max-retries 3
            --retry-wait-time 5
            README.md crates/*/README.md book/src/**/*.md
          fail: true

  deploy:
    if: github.ref == 'refs/heads/main'
    needs: build
    runs-on: ubuntu-latest
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - id: deployment
        uses: actions/deploy-pages@v4