rootle 0.3.0

Modal TUI for browsing remote source-control systems (GitHub in-tree, any forge via stdio providers) from the terminal
Documentation
name: demo

# Re-render the README demo and doc screenshots whenever the app or
# the demo tooling changes — README always shows the current look.
on:
  workflow_dispatch:
  push:
    branches: [main]
    paths:
      - "src/**"
      - "demos/**"
      - "e2e/**"
      - "Cargo.toml"
      - "Cargo.lock"

permissions:
  contents: write
  pull-requests: write

jobs:
  demo:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7

      - uses: astral-sh/setup-uv@v7

      # shots.py renders with DejaVu fonts (present on ubuntu runners).
      - name: Screenshots (doc/img)
        run: uv run --project e2e python demos/shots.py

      - name: Build binary for the tape
        run: docker compose run --build --rm release

      # VHS resolves fonts via fontconfig: install the vendored
      # JetBrains Mono into the container first.
      - name: Render demo.gif
        run: |
          docker run --rm -v "$PWD:/vhs" -w /vhs --entrypoint sh ghcr.io/charmbracelet/vhs -c \
            "mkdir -p /usr/share/fonts/truetype/jbmono && \
             cp /vhs/demos/fonts/JetBrainsMono-*.ttf /usr/share/fonts/truetype/jbmono/ && \
             fc-cache -f >/dev/null 2>&1; exec vhs demos/demo.tape"

      # Idempotent: an unchanged render commits nothing, so this never
      # loops. main is protected, so changed artifacts land as a PR on
      # a fixed branch (force-pushed, one open PR at a time) instead of
      # a direct push.
      - name: Open artifacts PR if renders changed
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          git config user.name "github-actions[bot]"
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
          git add doc/demo.gif doc/img/
          git diff --cached --quiet && exit 0
          git checkout -B demo/artifacts
          git commit -m "docs: refresh demo.gif + screenshots"
          git push -f origin demo/artifacts
          if ! gh pr view demo/artifacts --json state -q .state 2>/dev/null | grep -q OPEN; then
            gh pr create --base main --head demo/artifacts \
              --title "docs: refresh demo.gif + screenshots" \
              --body "Re-rendered demo artifacts from the demo workflow. Docs-only: bot PRs don't trigger CI, so merge with the admin override."
          fi