Browse Source

Add vhs-action for boa_cli

add-vhs-ci
Kevin Ness 2 weeks ago
parent
commit
6fb4289363
  1. 37
      .github/tapes/boa_cli.tape
  2. 31
      .github/workflows/artifacts.yml
  3. 2
      cli/README.md
  4. BIN
      cli/assets/boa_cli.gif

37
.github/tapes/boa_cli.tape

@ -0,0 +1,37 @@
Output cli/assets/boa_cli.gif
# Setup env
Hide
Set TypingSpeed 50ms
Set Theme "GruvboxDark"
Set Shell fish
# boa_cli needs to be installed for the tape to run.
Require boa
Show
Type "boa"
Sleep 100ms
Enter
Type "2 + '2'"
Enter
Sleep 100ms
Type "const sayHello = () => { return 'Hello World!' };"
Enter
Sleep 100ms
Type "sayHello();"
Enter
Sleep 2s

31
.github/workflows/artifacts.yml

@ -0,0 +1,31 @@
name: Build Artifacts
on:
push:
branches:
- main
jobs:
build_cli_tape:
name: Generate boa_cli GIF
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo install --path ./cli
# Below is from vhs-actions examples
# https://github.com/charmbracelet/vhs-action/blob/main/examples/auto-commit.yml
- uses: charmbracelet/vhs-action@v1
with:
path: './.github/tapes/boa_cli.tape'
- uses: stefanzweifel/git-auto-commit-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: Update generated VHS GIF
branch: main
commit_user_name: vhs-action 📼
commit_user_email: actions@github.com
commit_author: vhs-action 📼 <actions@github.com>
file_pattern: '*.gif'

2
cli/README.md

@ -18,6 +18,8 @@ your CLI.
<!-- TODO (nekevss): Potentially add CI driven gifs with https://github.com/charmbracelet/vhs -->
<!-- NOTE (nekevss): VHS is currently bugged and non-functional on Windows. -->
![](./assets/boa_cli.gif)
Once installed, your good to go!
To execute some JavaScript source code, navigate to the directy of your choosing and type:

BIN
cli/assets/boa_cli.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Loading…
Cancel
Save