tinytown 0.10.0

A simple, fast multi-agent orchestration system using Redis for message passing
Documentation
name: Documentation

on:
  push:
    branches: [main]
    paths:
      - "src/**"
      - "docs/**"
      - "Cargo.toml"
      - ".github/workflows/docs.yml"
  workflow_dispatch:

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

concurrency:
  group: "pages"
  cancel-in-progress: false

jobs:
  build:
    name: Build Documentation
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable

      - name: Install mdBook
        run: cargo install mdbook

      - name: Build mdBook guide
        run: mdbook build docs

      - name: Build rustdoc API reference
        run: cargo doc --no-deps --all-features

      - name: Combine documentation
        run: |
          # mdBook builds to docs/book/
          # rustdoc builds to target/doc/
          # Put rustdoc under docs/book/api/
          mkdir -p docs/book/api
          cp -r target/doc/* docs/book/api/
          echo '<meta http-equiv="refresh" content="0; url=tinytown/index.html">' > docs/book/api/index.html

      - name: Upload artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: docs/book

  deploy:
    name: Deploy to GitHub Pages
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4