From a7126a1a9b128513398100438d1f5dfd9b5957fe Mon Sep 17 00:00:00 2001 From: UltraLion <49597041+UltraLionfr@users.noreply.github.com> Date: Tue, 11 Jul 2023 22:44:40 +0200 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6a48ab6 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,54 @@ +# GitHub Action for generating a contribution graph with a snake eating your contributions. + +name: Generate Snake + +# Controls when the action will run. This action runs every 6 hours. + +on: + schedule: + # every 6 hours + - cron: "0 */6 * * *" + +# This command allows us to run the Action automatically from the Actions tab. + workflow_dispatch: + +# The sequence of runs in this workflow: +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + + # Checks repo under $GITHUB_WORKSHOP, so your job can access it + - uses: actions/checkout@v2 + + # Generates the snake + - uses: Platane/snk@master + id: snake-gif + with: + github_user_name: UltraLionfr + # these next 2 lines generate the files on a branch called "output". This keeps the main branch from cluttering up. + gif_out_path: dist/github-contribution-grid-snake.gif + svg_out_path: dist/github-contribution-grid-snake.svg + + # show the status of the build. Makes it easier for debugging (if there's any issues). + - run: git status + + # Push the changes + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: master + force: true + + - uses: crazy-max/ghaction-github-pages@v2.1.3 + with: + # the output branch we mentioned above + target_branch: output + build_dir: dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}