Generate Snake Game #627
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
name: Generate Snake Game | |
on: | |
schedule: | |
# every 6 hours | |
- cron: "0 */6 * * *" | |
# This command allows us to run the Action automatically from the Actions tab. | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: generate github-contribution-grid-snake.svg | |
uses: Platane/snk/svg-only@v2 | |
with: | |
github_user_name: ${{ github.repository_owner }} | |
outputs: | | |
dist/github-contribution-grid-snake.svg?color_snake=blue | |
dist/github-contribution-grid-snake-dark.svg?palette=github-dark&color_snake=blue | |
# push the content of <build_dir> to a branch | |
# the content will be available at https://raw.githubusercontent.com/<github_user>/<repository>/<target_branch>/<file> , or as github page | |
- name: push github-contribution-grid-snake.svg to the output branch | |
uses: crazy-max/ghaction-github-pages@v3.1.0 | |
with: | |
target_branch: output | |
build_dir: dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} |