hunch 2.0.2

A media filename parser for movies, TV, and anime — built in Rust, inspired by guessit
Documentation
name: Deploy Docs

# Builds the mdbook docs/ site and pushes the rendered HTML to the
# gh-pages branch.
#
# GitHub Pages source must be set to:
#   Settings → Pages → Build and deployment → Source: "Deploy from a branch"
#                                          → Branch: gh-pages / (root)

on:
  push:
    branches: [main]
    paths:
      - 'docs/**'
      - '.github/workflows/docs.yml'
  workflow_dispatch:
    # Manual trigger for emergency redeploys (e.g., re-render after a
    # mdbook version bump that changes output).

permissions:
  contents: read

# Only one deploy at a time; don't cancel in-progress deploys (we want
# every push to land in gh-pages history).
concurrency:
  group: pages-deploy
  cancel-in-progress: false

env:
  MDBOOK_VERSION: "0.5.2"  # Pin to match local dev tooling

jobs:
  build-and-deploy:
    name: Build mdbook + deploy to gh-pages
    runs-on: ubuntu-latest
    # Token override needed for peaceiris to push to gh-pages.
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6

      - name: Install mdbook
        # taiki-e/install-action provides pre-built binaries (no cargo
        # build), keeping the deploy job under 30s.
        uses: taiki-e/install-action@cca35edeb1d01366c2843b68fc3ca441446d73d3  # v2
        with:
          tool: mdbook@${{ env.MDBOOK_VERSION }}

      - name: Build book
        run: mdbook build docs

      - name: Deploy to gh-pages
        uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e  # v4
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_branch: gh-pages
          publish_dir: docs/book
          # No keep_files: the bench dashboard data at /dev/bench/ that
          # this used to preserve was retired alongside benches/ and the
          # benchmark workflow. Next deploy wipes it cleanly.
          commit_message: 'docs: deploy mdbook from ${{ github.sha }}'
          user_name: 'github-actions[bot]'
          user_email: '41898282+github-actions[bot]@users.noreply.github.com'