Skip to content

Commit bc7e435

Browse files
authored
Create snk.yml
1 parent 97382dd commit bc7e435

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/snk.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: generate snake animation
2+
3+
on:
4+
# run automatically every 6 hours
5+
schedule:
6+
- cron: "0 */1 * * *"
7+
8+
# allows to manually run the job at any time
9+
workflow_dispatch:
10+
11+
jobs:
12+
generate:
13+
permissions:
14+
contents: write
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 5
17+
18+
steps:
19+
# generates a snake game from a github user (<github_user_name>) contributions graph, output a svg animation at <svg_out_path>
20+
- name: generate github-contribution-grid-snake.svg
21+
uses: Platane/snk/svg-only@v3
22+
with:
23+
github_user_name: ${{ github.repository_owner }}
24+
outputs: |
25+
dist/github-contribution-grid-snake.svg
26+
dist/github-contribution-grid-snake-dark.svg?palette=github-dark
27+
28+
29+
# push the content of <build_dir> to a branch
30+
# the content will be available at https://raw.githubusercontent.com/<github_user>/<repository>/<target_branch>/<file> , or as github page
31+
- name: push github-contribution-grid-snake.svg to the output branch
32+
uses: crazy-max/ghaction-github-pages@v3.1.0
33+
with:
34+
target_branch: output
35+
build_dir: dist
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)