Skip to content

Commit

Permalink
demo: improve the demo style (#1066)
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-matsui authored Dec 29, 2024
1 parent ad900f9 commit 1da83a9
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ jobs:
- name: Check workflow files
run: ${{ steps.get_actionlint.outputs.executable }} -color
shell: bash
env:
SHELLCHECK_OPTS: --exclude=SC2016
24 changes: 24 additions & 0 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,29 @@ jobs:
- name: Install VHS
run: go install github.com/charmbracelet/vhs@latest

- name: Install Nerd Font
run: |
mkdir -p ~/.local/share/fonts
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/FiraCode.zip
unzip FiraCode.zip -d ~/.local/share/fonts/
fc-cache -fv
- name: Install Zsh
run: sudo apt update && sudo apt install -y zsh

- name: Install zsh-syntax-highlighting
run: |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/z
echo 'source ~/z/zsh-syntax-highlighting.zsh' >> ~/.zshrc
- name: Install Starship
run: |
curl -sS https://starship.rs/install.sh | sh -s -- -y
echo 'eval "$(starship init zsh)"' >> ~/.zshrc
- name: Move demo.tape
run: mv demo.tape ${{ runner.temp }}

- name: Generate and publish a new demo
run: vhs --publish demo.tape
working-directory: ${{ runner.temp }}
20 changes: 16 additions & 4 deletions demo.tape
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,24 @@

Output demo.gif

Require zsh
Require starship
Require cabin

Set Shell "bash"
Set FontSize 32
Set Width 1600
Set Height 800
Set Shell "zsh"
Set FontSize 16
Set FontFamily "FiraCode Nerd Font"
Set Width 800
Set Height 450
Set WindowBar Colorful
Set Padding 20
Set Margin 20
Set MarginFill "#000000"
Set BorderRadius 10

Hide
Type "source ~/.zshrc && clear" Enter
Show

Type "cabin version" Sleep 500ms Enter Sleep 1s
Type "cabin new hello_world" Sleep 500ms Enter Sleep 1s
Expand Down

0 comments on commit 1da83a9

Please sign in to comment.