增加单独动画文件

This commit is contained in:
jimmy committed 2025-01-05 21:55:46 +08:00
1 parent 558da72143
commit 1aad75ef2c
2 files changed
+44 -9

No files matched your search

-9
View File
@@ -40,15 +40,6 @@ jobs:
env:
HUGO_VERSION: ${{ github.event.inputs.hugoVersion || '0.125.7' }}
steps:
- # generates a snake game from a github user (<github_user_name>) contributions graph, output a svg animation at <svg_out_path>
- name: generate github-contribution-grid-snake.svg
- uses: Platane/snk/svg-only@v3
- with:
- github_user_name: ${{ github.repository_owner }}
- outputs: |
- dist/github-contribution-grid-snake.svg
- dist/github-contribution-grid-snake-dark.svg?palette=github-dark
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.deb \
+44
View File
@@ -0,0 +1,44 @@
name: generate readme animation
on:
# run automatically every 24 hours
schedule:
- cron: "0 */24 * * *"
# 允许随时手动运行作业
workflow_dispatch:
# run on every push on the master branch
push:
branches:
- main
jobs:
generate:
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
# generates a snake game from a github user (<github_user_name>) contributions graph, output a svg animation at <svg_out_path>
- name: generate github-contribution-grid-snake.svg
uses: duyl328/snk/svg-only@v3
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
dist/github-contribution-grid-snake.svg
dist/github-contribution-grid-snake-dark.svg?palette=github-dark
# 将 <build_dir> 的内容推送到分支
# 内容将在 https://raw.githubusercontent.com/<github_user>/<repository>/<target_branch>/<file> 提供,或作为 github 页面提供
- 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.GITHUB_TOKEN }}