From 1c775048cb43733c2200b0f6d7f58767ef787de2 Mon Sep 17 00:00:00 2001 From: JEEVITHA KANNAN K S Date: Thu, 3 Oct 2024 11:43:48 +0530 Subject: [PATCH 1/2] Add vhs github action --- .github/workflows/linutil.yml | 22 ++++++++++++---------- docs/assets/preview.tape | 9 +++++---- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/linutil.yml b/.github/workflows/linutil.yml index e6d464da..4c58a08b 100644 --- a/.github/workflows/linutil.yml +++ b/.github/workflows/linutil.yml @@ -89,22 +89,24 @@ 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/vhs-action@v2.1.0 + with: + path: "docs/assets/preview.tape" + install-fonts: "true" - - 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() \ No newline at end of file diff --git a/docs/assets/preview.tape b/docs/assets/preview.tape index ca2b59d7..66b1c359 100644 --- a/docs/assets/preview.tape +++ b/docs/assets/preview.tape @@ -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 From ec720050367512889f030d218f0bf07d0af70dc9 Mon Sep 17 00:00:00 2001 From: JEEVITHA KANNAN K S Date: Thu, 3 Oct 2024 23:54:32 +0530 Subject: [PATCH 2/2] Remove install fonts vhs action downloads jetbrains mono nf by default --- .github/workflows/linutil.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/linutil.yml b/.github/workflows/linutil.yml index 4c58a08b..53c43d02 100644 --- a/.github/workflows/linutil.yml +++ b/.github/workflows/linutil.yml @@ -97,7 +97,6 @@ jobs: uses: charmbracelet/vhs-action@v2.1.0 with: path: "docs/assets/preview.tape" - install-fonts: "true" - name: Move preview run: |