Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demo: improve the demo style #1066

Merged
merged 1 commit into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading