diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2024-11-23 21:27:37 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2024-11-23 21:27:37 -0500 |
commit | a2cdcdd0b5e3ef02b0a2b1aeaeae387695f643d9 (patch) | |
tree | 63fa187e2444716c2fe53614798c9a8e29254dba /.github/workflows/generate-gif.yml | |
parent | 4d25e4ece0b72d240bb2565f8abb7389e650990a (diff) |
CI/CD test 1
Diffstat (limited to '.github/workflows/generate-gif.yml')
-rw-r--r-- | .github/workflows/generate-gif.yml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/.github/workflows/generate-gif.yml b/.github/workflows/generate-gif.yml new file mode 100644 index 0000000..ab694b6 --- /dev/null +++ b/.github/workflows/generate-gif.yml @@ -0,0 +1,40 @@ +--- +name: Generate GIF Demo +on: + push: + branches: [main] +jobs: + generate-gif: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Set up Go (if required by vhs) + uses: actions/setup-go@v3 + with: + go-version: '1.22' + - name: Install vhs + run: | + go install github.com/charmbracelet/vhs@latest + - name: Install Gif Generation dependencies + run: | + sudo apt update + sudo apt install ffmpeg ttyd -y + - name: Build the termpicker binary for vhs + run: go build -o termpicker ./cmd/termpicker + - name: Generate GIF with vhs + run: | + vhs ./assets/demo.tape + - name: Commit and push GIF update + run: | + git config --global user.name 'github-actions' + git config --global user.email 'github-actions@github.com' + if git diff --quiet; then + echo "No changes to commit." + else + git add ./assets/demo.gif + git commit -m 'Update GIF preview' + git push + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |