Skip to content

Commit

Permalink
feat: attempt to generate gif in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cfoust committed Nov 18, 2023
1 parent 310c33c commit 5589711
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write # To push a branch
pages: write # To push to a GitHub Pages site
contents: write # To push a branch
pages: write # To push to a GitHub Pages site
id-token: write # To update the deployment status
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install latest mdbook
run: |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
Expand All @@ -26,13 +27,24 @@ jobs:
run: |
cd docs
mdbook build
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.19"
- name: Build
run: go build -o stories ./cmd/stories/main.go
- uses: charmbracelet/vhs-action@v1
with:
path: "ci/cy.tape"

- name: Setup pages
uses: actions/configure-pages@v2
- name: Upload site
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: 'docs/book'
path: "docs/book"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
4 changes: 2 additions & 2 deletions ci/cy.tape
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Output cy.gif
Output docs/book/cy.gif

Set Padding 0
Set Framerate 23
Set PlaybackSpeed 0.5
Set LoopOffset 20%

Hide
Type "go run ./cmd/stories/main.go -s splash && clear"
Type "./stories -s splash && clear"
Enter
Sleep 2s
Show
Expand Down

0 comments on commit 5589711

Please sign in to comment.