Skip to content

Commit 0266e4a

Browse files
committed
feat: add JetBrainsMono Nerd Font to VHS tapes and workflow
1 parent c878fff commit 0266e4a

9 files changed

Lines changed: 37 additions & 32 deletions

.github/workflows/generate-terminal-gifs.yaml

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,8 @@ permissions:
77
contents: write
88
pull-requests: write
99

10-
11-
# tapes:
12-
# - 'docs/vhs/install.tape'
13-
# - 'docs/vhs/basic-usage.tape'
14-
# - 'docs/vhs/yaml-config.tape'
15-
# - 'docs/vhs/mappings-demo.tape'
16-
# - 'docs/vhs/multiple-mappings.tape'
17-
# - 'docs/vhs/advanced-features.tape'
18-
# - 'docs/vhs/remote-content.tape'
19-
# - 'docs/vhs/schema-generation.tape'
20-
2110
jobs:
22-
run-tapes:
11+
generate-gifs:
2312
runs-on: ubuntu-latest
2413
steps:
2514
- name: Checkout
@@ -32,35 +21,43 @@ jobs:
3221
with:
3322
python-version: '3.x'
3423

35-
- name: 🚀 Setup Go
24+
- name: Setup Go
3625
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
3726
with:
38-
go-version: '1.25.1'
27+
go-version: '1.25.1'
3928

40-
- name: 🧪 Generate the gif with vhs
41-
if: github.actor != 'dependabot[bot]'
29+
- name: Install VHS dependencies
4230
run: |
43-
sudo apt update
44-
sudo apt install -y ffmpeg ttyd
31+
sudo apt-get update
32+
sudo apt-get install -y ffmpeg ttyd
4533
go install github.com/charmbracelet/vhs@latest
4634
47-
cd docs/vhs
48-
vhs install.tape
49-
vhs basic-usage.tape
50-
vhs yaml-config.tape
51-
vhs mappings-demo.tape
52-
vhs multiple-mappings.tape
53-
vhs advanced-features.tape
54-
vhs remote-content.tape
55-
vhs schema-generation.tape
56-
cd ..
35+
- name: Install JetBrainsMono Nerd Font
36+
run: |
37+
mkdir -p ~/.local/share/fonts/JetBrainsMono
38+
curl -fLo /tmp/JetBrainsMono.zip \
39+
https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip
40+
unzip -o /tmp/JetBrainsMono.zip -d ~/.local/share/fonts/JetBrainsMono
41+
fc-cache -fv
42+
43+
- name: Set up virtual environment
44+
run: |
45+
python3 -m venv .venv
46+
.venv/bin/pip install --upgrade pip
47+
.venv/bin/pip install -e .
48+
49+
- name: Generate GIFs
50+
run: bash scripts/generate-gifs.sh
5751

5852
- name: Create Pull Request
5953
uses: peter-evans/create-pull-request@v8
6054
with:
61-
commit-message: Update generated VHS GIF
62-
branch: repository-dispatch/update-${{ github.run_id }}
63-
title: Update generated VHS GIF
64-
body: This PR updates the generated VHS GIF files.
55+
commit-message: 'chore: update generated VHS GIFs'
56+
branch: automation/update-vhs-gifs-${{ github.run_id }}
57+
title: '[chore] update generated VHS GIFs'
58+
body: |
59+
This PR updates all generated VHS GIF files.
60+
61+
Triggered by workflow run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).
6562
base: main
6663
labels: automation

docs/vhs/advanced-features.tape

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Output docs/vhs/advanced-features.gif
22

33
Set Theme "Monokai Vivid"
4+
Set Font "JetBrainsMono Nerd Font"
45
Set FontSize 18
56
Set TypingSpeed 40ms
67
Set Width 1400

docs/vhs/basic-usage.tape

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Output docs/vhs/usage.gif
22

33
Set Theme "Dracula"
4+
Set Font "JetBrainsMono Nerd Font"
45
Set FontSize 18
56
Set Width 1200
67
Set Height 600

docs/vhs/install.tape

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Output docs/vhs/install.gif
33

44
Set Theme "Monokai Vivid"
5+
Set Font "JetBrainsMono Nerd Font"
56
Set FontSize 18
67
Set TypingSpeed 40ms
78
Set Width 1400

docs/vhs/mappings-demo.tape

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Output docs/vhs/mappings-demo.gif
22

33
Set Theme "Monokai Vivid"
4+
Set Font "JetBrainsMono Nerd Font"
45
Set FontSize 18
56
Set TypingSpeed 40ms
67
Set Width 1400

docs/vhs/multiple-mappings.tape

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Output docs/vhs/multiple-mappings.gif
22

33
Set Theme "Monokai Vivid"
4+
Set Font "JetBrainsMono Nerd Font"
45
Set FontSize 18
56
Set TypingSpeed 40ms
67
Set Width 1400

docs/vhs/remote-content.tape

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Output docs/vhs/remote-content.gif
22

33
Set Theme "Monokai Vivid"
4+
Set Font "JetBrainsMono Nerd Font"
45
Set FontSize 18
56
Set TypingSpeed 40ms
67
Set Width 1400

docs/vhs/schema-generation.tape

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Output docs/vhs/schema-generation.gif
22

33
Set Theme "Monokai Vivid"
4+
Set Font "JetBrainsMono Nerd Font"
45
Set FontSize 18
56
Set TypingSpeed 40ms
67
Set Width 1400

docs/vhs/yaml-config.tape

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Output docs/vhs/yaml-config.gif
22

33
Set Theme "Monokai Vivid"
4+
Set Font "JetBrainsMono Nerd Font"
45
Set FontSize 18
56
Set TypingSpeed 40ms
67
Set Width 1400

0 commit comments

Comments
 (0)