name: Update demo

permissions: {}

on:
  workflow_dispatch:

jobs:
  update-demo:
    timeout-minutes: 10
    permissions:
      contents: write
      pull-requests: write
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
        with:
          persist-credentials: false
      - uses: ./.github/actions/setup

      - run: vhs < ./tapes/demo.tape
      - run: vhs < ./tapes/gess.tape

      - uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          title: "chore: Update demo"
          body: ${{ github.sha }}
          branch: docs/update
          branch-suffix: short-commit-hash
