name: Demo

on:
  workflow_dispatch:

permissions:
  contents: write

concurrency:
  group: demo-deploy
  cancel-in-progress: true

jobs:
  deploy:
    name: Deploy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: jetli/wasm-pack-action@v0.4.0
        with: { version: v0.13.1 }
      - uses: Swatinem/rust-cache@v2
      - uses: extractions/setup-just@v3
      - run: just web
      - uses: peaceiris/actions-gh-pages@v4
        with:
          keep_files: true
          force_orphan: true
          publish_dir: examples/web
          destination_dir: demo
          github_token: "${{ secrets.GITHUB_TOKEN }}"
