From 09a37fd26fa568917b1a1ec38b9f0190781f5bf2 Mon Sep 17 00:00:00 2001 From: Alvin <524715@vistacollege.nl> Date: Tue, 16 Sep 2025 10:10:34 +0200 Subject: [PATCH] Refactor GitHub Actions workflow for generating contribution snake by removing push trigger and improving step organization --- .github/workflows/snake.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/snake.yml b/.github/workflows/snake.yml index 98d9e23..dbf244f 100644 --- a/.github/workflows/snake.yml +++ b/.github/workflows/snake.yml @@ -4,21 +4,26 @@ on: schedule: - cron: "0 0 * * *" # Runs every day at midnight workflow_dispatch: # Allow manual runs - push: - branches: - - main jobs: build: runs-on: ubuntu-latest steps: - - uses: Platane/snk@v3 + # 1. Checkout repo + - name: Checkout repository + uses: actions/checkout@v3 + + # 2. Generate snake SVG + - name: Generate Snake + uses: Platane/snk/svg-only@v3 with: github_user_name: Alvin-Zilverstand outputs: dist/snake.svg + + # 3. Push generated snake to output branch - name: Push Snake to output branch uses: EndBug/add-and-commit@v9 with: - branch: output - message: "chore: update snake animation" add: "dist/snake.svg" + new_branch: output + message: "chore: update snake animation"