diff --git a/.github/workflows/update-demo.yml b/.github/workflows/update-demo.yml new file mode 100644 index 0000000..16abf79 --- /dev/null +++ b/.github/workflows/update-demo.yml @@ -0,0 +1,39 @@ +name: update demo + +on: + workflow_dispatch: + push: + branches: + - automate-update-gif + +env: + CLICOLOR_FORCE: "1" + +jobs: + update-demo: + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version-file: go.mod + + - uses: charmbracelet/vhs-action@v1 + with: + path: ./tapes/cli-demo.tape + token: ${{ secrets.GITHUB_TOKEN }} + - uses: charmbracelet/vhs-action@v1 + with: + path: ./tapes/library-demo.tape + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: peter-evans/create-pull-request@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + title: update docs + body: ${{ github.sha }} + branch: docs/update + branch-suffix: short-commit-hash diff --git a/docs/tapes/update.sh b/docs/tapes/update.sh deleted file mode 100755 index 856001b..0000000 --- a/docs/tapes/update.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -vhs < ./docs/tapes/cli-demo.tape -vhs < ./docs/tapes/library-demo.tape diff --git a/docs/tapes/cli-demo.tape b/tapes/cli-demo.tape similarity index 100% rename from docs/tapes/cli-demo.tape rename to tapes/cli-demo.tape diff --git a/docs/tapes/library-demo.tape b/tapes/library-demo.tape similarity index 100% rename from docs/tapes/library-demo.tape rename to tapes/library-demo.tape