Generate Snake #383
This file contains hidden or 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 | |
| on: | |
| schedule: | |
| - cron: "0 2 * * *" # Runs every day 2:00 | |
| push: | |
| branches: | |
| - main # 添加 main 分支的 push 触发 | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Generate Snake | |
| uses: Platane/snk@v3 | |
| with: | |
| github_user_name: ${{ github.repository_owner }} | |
| outputs: | | |
| dist/github-contribution-grid-snake.svg?color_snake=orange | |
| dist/github-contribution-grid-snake-dark.svg?palette=github-dark&color_snake=orange | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Push to output branch | |
| uses: crazy-max/ghaction-github-pages@v3.1.0 | |
| with: | |
| target_branch: output | |
| build_dir: dist | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |