Skip to content

Commit b787720

Browse files
authored
Update snake.yml
1 parent 279249f commit b787720

1 file changed

Lines changed: 29 additions & 18 deletions

File tree

.github/workflows/snake.yml

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
1-
- uses: Platane/snk@v3
2-
with:
3-
# github user name to read the contribution graph from (**required**)
4-
# using action context var `github.repository_owner` or specified user
5-
github_user_name: ${{ github.repository_owner }}
1+
name: Generate Snake
62

7-
# list of files to generate.
8-
# one file per line. Each output can be customized with options as query string.
9-
#
10-
# supported options:
11-
# - palette: A preset of color, one of [github, github-dark, github-light]
12-
# - color_snake: Color of the snake
13-
# - color_dots: Coma separated list of dots color.
14-
# The first one is 0 contribution, then it goes from the low contribution to the highest.
15-
# Exactly 5 colors are expected.
16-
outputs: |
17-
dist/github-snake.svg
18-
dist/github-snake-dark.svg?palette=github-dark
19-
dist/ocean.gif?color_snake=orange&color_dots=#bfd6f6,#8dbdff,#64a1f4,#4b91f1,#3c7dd9
3+
on:
4+
schedule:
5+
- cron: "0 */12 * * *" # Runs every 12 hours
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Generate Snake
15+
uses: Platane/snk@v3
16+
with:
17+
github_user_name: ${{ github.repository_owner }}
18+
outputs: |
19+
dist/github-contribution-grid-snake.svg
20+
dist/github-contribution-grid-snake-dark.svg?palette=github-dark
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
24+
- name: Push to output branch
25+
uses: crazy-max/ghaction-github-pages@v3.1.0
26+
with:
27+
target_branch: output
28+
build_dir: dist
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)