-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffecdbd
commit e004c91
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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]" |