Skip to content

Commit cae329f

Browse files
Snake Design
1 parent 3e41f42 commit cae329f

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/snake.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: GitHub Snake Game
2+
3+
on:
4+
# Schedule the workflow to run daily at midnight UTC
5+
schedule:
6+
- cron: "0 0 * * *"
7+
# Allow manual triggering of the workflow
8+
workflow_dispatch:
9+
# Trigger the workflow on pushes to the main branch
10+
push:
11+
branches:
12+
- main
13+
jobs:
14+
generate:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 10
17+
steps:
18+
# Step 1: Checkout the repository
19+
- name: Checkout Repository
20+
uses: actions/checkout@v3
21+
# Step 2: Generate the snake animations
22+
- name: Generate GitHub Contributions Snake Animations
23+
uses: Platane/snk@v3
24+
with:
25+
# GitHub username to generate the animation for
26+
github_user_name: ${{ github.repository_owner }}
27+
# Define the output files and their configurations
28+
outputs: |
29+
dist/github-snake.svg
30+
dist/github-snake-dark.svg?palette=github-dark
31+
dist/ocean.gif?color_snake=orange&color_dots=#bfd6f6,#8dbdff,#64a1f4,#4b91f1,#3c7dd9
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
# Step 3: Deploy the generated files to the 'output' branch
35+
- name: Deploy to Output Branch
36+
uses: peaceiris/actions-gh-pages@v3
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: ./dist
40+
publish_branch: output
41+
# Optionally, you can set a custom commit message
42+
commit_message: "Update snake animation [skip ci]"

0 commit comments

Comments
 (0)