update demo #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: update demo | |
on: | |
workflow_dispatch: | |
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 | |
# to install ttyd and ffmpeg | |
- uses: charmbracelet/vhs-action@v1 | |
with: | |
path: ./tapes/cli/demo.tape | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: install vhs | |
run: go install github.com/charmbracelet/vhs@latest | |
- name: update cli gif | |
run: | | |
for t in ./tapes/cli/*; do | |
vhs < $t | |
done | |
- name: update library gif | |
run: | | |
for t in ./tapes/library/*; do | |
vhs < $t | |
done | |
- uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
title: update docs | |
body: ${{ github.sha }} | |
branch: docs/update | |
branch-suffix: short-commit-hash |