Skip to content

Commit

Permalink
Merge pull request #745 from jeevithakannan2/main
Browse files Browse the repository at this point in the history
refact: vhs github action
  • Loading branch information
ChrisTitusTech authored Oct 8, 2024
2 parents d823e5e + ec72005 commit e31eccd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/linutil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,23 @@ jobs:
version: ${{ env.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install vhs
- name: Setup Preview
run: |
wget 'https://github.com/charmbracelet/vhs/releases/download/v0.8.0/vhs_0.8.0_amd64.deb'
sudo apt install -y ffmpeg
sudo snap install ttyd --classic
sudo dpkg -i 'vhs_0.8.0_amd64.deb'
echo "$(pwd)/build" >> $GITHUB_PATH
- name: Generate preview
uses: charmbracelet/[email protected]
with:
path: "docs/assets/preview.tape"

- name: Build the preview
- name: Move preview
run: |
export PATH="$(pwd)/build:$PATH"
vhs docs/assets/preview.tape -o docs/assets/preview.gif
mv preview.gif docs/assets/preview.gif
- name: Upload the preview
- name: Upload preview
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Preview for ${{ env.version }}
file_pattern: "docs/assets/preview.gif"
add_options: "--force"
if: success()
if: success()
9 changes: 5 additions & 4 deletions docs/assets/preview.tape
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ Require linutil
Require sh

Set Shell "bash"
Set FontSize 32
Set Width 3200
Set Height 1800
Set FontFamily "JetBrainsMono Nerd Font"
Set FontSize 24
Set Width 1920
Set Height 1080

Sleep 1s

Type "linutil -t compatible" Sleep 1s Enter
Type "linutil" Sleep 1s Enter

Sleep 5s

Expand Down

0 comments on commit e31eccd

Please sign in to comment.