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