Skip to content

Implement CI to automatically generate documentation gifs using vhs #14

Implement CI to automatically generate documentation gifs using vhs

Implement CI to automatically generate documentation gifs using vhs #14

Workflow file for this run

name: Generate gifs from VHS tapes
on:
workflow_dispatch:
pull_request:
paths:
- docs/tapes/*.tape
jobs:
vhs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip
- name: Setup Kapitan
run: |
apt-get update && apt install ffmpeg
python -m pip install --upgrade pip
pip install git+https://github.com/kapicorp/kapitan@init-with-copier
go install github.com/charmbracelet/vhs@latest
- name: run VHS
run: |
# shellcheck disable=SC2086
for file in docs/tapes/*.tape
do
filename="$(basename ${file})"
$HOME/go/bin/vhs "${file}" -o "docs/vhs/gifs/${filename%%.tape}.gif"
done
- uses: stefanzweifel/git-auto-commit-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: Update generated VHS GIF
commit_user_name: vhs-action 📼
commit_user_email: [email protected]
commit_author: vhs-action 📼 <[email protected]>
file_pattern: '*.gif'