Skip to content

Commit 742fac0

Browse files
Rohan5commitCopilot
andcommitted
chore: auto-refresh demo gif
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c9e111b commit 742fac0

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/generate-demo.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@ name: Generate Demo GIF
33
on:
44
workflow_dispatch:
55

6+
permissions:
7+
contents: write
8+
69
jobs:
710
demo:
811
runs-on: ubuntu-latest
912
steps:
1013
- name: Checkout
1114
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
1217

1318
- name: Setup Python
1419
uses: actions/setup-python@v5
@@ -24,8 +29,20 @@ jobs:
2429
run: |
2530
docker run --rm -v "$PWD":/vhs ghcr.io/charmbracelet/vhs .github/demo.tape
2631
32+
- name: Commit refreshed demo.gif
33+
run: |
34+
if git diff --quiet -- demo.gif; then
35+
echo "demo.gif unchanged"
36+
exit 0
37+
fi
38+
git config user.name "github-actions[bot]"
39+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
40+
git add demo.gif
41+
git commit -m "chore: refresh demo gif" -m "Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>"
42+
git push
43+
2744
- name: Upload demo artifact
2845
uses: actions/upload-artifact@v4
2946
with:
3047
name: demo-gif
31-
path: demo.gif
48+
path: demo.gif

0 commit comments

Comments
 (0)