summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/go.yml26
-rw-r--r--assets/demo.tape14
2 files changed, 26 insertions, 14 deletions
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 0b94f74..ae86aac 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -1,7 +1,5 @@
---
-# This workflow will build a golang project
-# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
-name: Go
+name: VHS Gif Updater
on:
push:
branches: [master]
@@ -23,10 +21,24 @@ jobs:
run: go build -o ./termpicker -v ./cmd/termpicker
- name: Test
run: go test -v ./...
- - name: VHS Gif update
- uses: charmbracelet/vhs-action@v1
- with:
- path: assets/demo.tape
+ - name: Install VHS dependencies
+ run: |
+ sudo apt update
+ sudo apt install -y ffmpeg zsh
+ wget https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.x86_64
+ sudo chmod +x ttyd.x86_64
+ sudo mv ttyd.x86_64 /usr/local/bin/ttyd
+ - name: Install VHS
+ run: |
+ wget https://github.com/charmbracelet/vhs/releases/download/v0.8.0/vhs_0.8.0_amd64.deb
+ sudo dpkg -i vhs_0.8.0_amd64.deb
+ - name: Enable Color Output
+ run: |
+ echo 'export TERM=xterm-256color' >> $GITHUB_ENV
+ echo 'export CLICOLOR=1' >> $GITHUB_ENV
+ echo 'export FORCE_COLOR=1' >> $GITHUB_ENV
+ - name: Generate Demo GIF
+ run: vhs ./assets/demo.tape
- name: Commit and push updated GIF demo
run: |-
git config --global user.name 'github-actions'
diff --git a/assets/demo.tape b/assets/demo.tape
index 98c2460..a20672e 100644
--- a/assets/demo.tape
+++ b/assets/demo.tape
@@ -1,17 +1,14 @@
-# Where should we write the GIF?
Output ./assets/demo.gif
-# Set up a 1200x600 terminal with 46px font.
Set FontSize 24
Set Width 1000
Set Height 500
-
-
Set Shell zsh
+
Type "./termpicker"
Enter
Sleep 2s
-Type "l"
+Type "jl"
Sleep 500ms
Type "j"
Sleep 500ms
@@ -23,6 +20,9 @@ Tab
Sleep 500ms
Type "jllljhhklhkhh"
Sleep 1.5s
-Type "q"
+Tab
Sleep 500ms
-
+Type "jllljhhklhkhh"
+Sleep 1.5s
+Type "q"
+Sleep 250ms