Simple Guide: How To Set Up A Snake Eating Your Contributions On GitHub

Would you like to have a snake eating all your contributions on your GitHub Profile README? Well, thanks to Platane, that is possible!
Check it out

Are you ready?

Step 1: Create your profile README

That would be the README t…


This content originally appeared on DEV Community and was authored by Helena Archer

Snake

Would you like to have a snake eating all your contributions on your GitHub Profile README? Well, thanks to Platane, that is possible!
Check it out

Are you ready?

Eating Popcorn

Step 1: Create your profile README

That would be the README that is shown on your profile link, you create it with a repository with the same name as your GitHub username (including casing). If you wanna know more about it click here.

Step 2: Set up your GitHub Actions

➡️ On your profile repository click on Actions

image

➡️ Create a new workflow and click on set up a workflow yourself

image

➡️ Make sure the workflow you are setting up is a yml file
image

➡️ On Edit new file you can paste this and the line github_user_name: [YOUR_USERNAME_HERE] with your GitHub Username


name: Generate Snake

on:
  schedule: # execute every 12 hours
    - cron: "* */12 * * *"
  workflow_dispatch:

jobs:
  build:
    name: Update Data
    runs-on: ubuntu-latest
    steps:
      # Snake Animation
      - uses: Platane/snk@master
        id: snake-gif
        with:
          github_user_name: [YOUR_USERNAME_HERE]
          svg_out_path: dist/github-contribution-grid-snake.svg

  - uses: crazy-max/ghaction-github-pages@v2.1.3
    with:
      target_branch: output
      build_dir: dist
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

image

➡️ Under Workflows, you should see the Generate Snake Action you created. You should have now a green ✅ "build" checkmark. That means your Action is working and you're ready for the next step

Step 3: Add to your README

So there are 2 ways of adding that to your README file. You can either use Markdown or good old HTML

I decided to go for HTML so I could centre the image. That's how it looks on mine:
image

➡️ Don't forget to change YOUR_USERNAME for your GitHub Username.

<img src="https://github.com/YOUR_USERNAME/YOUR_USERNAME/blob/output/github-contribution-grid-snake.svg" /></p>

OR

![Snake](https://github.com/YOUR_USERNAME/YOUR_USERNAME/blob/output/github-contribution-grid-snake.svg)

✨Follow me on GitHub✨


This content originally appeared on DEV Community and was authored by Helena Archer


Print Share Comment Cite Upload Translate Updates
APA

Helena Archer | Sciencx (2021-08-06T11:22:58+00:00) Simple Guide: How To Set Up A Snake Eating Your Contributions On GitHub. Retrieved from https://www.scien.cx/2021/08/06/simple-guide-how-to-set-up-a-snake-eating-your-contributions-on-github/

MLA
" » Simple Guide: How To Set Up A Snake Eating Your Contributions On GitHub." Helena Archer | Sciencx - Friday August 6, 2021, https://www.scien.cx/2021/08/06/simple-guide-how-to-set-up-a-snake-eating-your-contributions-on-github/
HARVARD
Helena Archer | Sciencx Friday August 6, 2021 » Simple Guide: How To Set Up A Snake Eating Your Contributions On GitHub., viewed ,<https://www.scien.cx/2021/08/06/simple-guide-how-to-set-up-a-snake-eating-your-contributions-on-github/>
VANCOUVER
Helena Archer | Sciencx - » Simple Guide: How To Set Up A Snake Eating Your Contributions On GitHub. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/06/simple-guide-how-to-set-up-a-snake-eating-your-contributions-on-github/
CHICAGO
" » Simple Guide: How To Set Up A Snake Eating Your Contributions On GitHub." Helena Archer | Sciencx - Accessed . https://www.scien.cx/2021/08/06/simple-guide-how-to-set-up-a-snake-eating-your-contributions-on-github/
IEEE
" » Simple Guide: How To Set Up A Snake Eating Your Contributions On GitHub." Helena Archer | Sciencx [Online]. Available: https://www.scien.cx/2021/08/06/simple-guide-how-to-set-up-a-snake-eating-your-contributions-on-github/. [Accessed: ]
rf:citation
» Simple Guide: How To Set Up A Snake Eating Your Contributions On GitHub | Helena Archer | Sciencx | https://www.scien.cx/2021/08/06/simple-guide-how-to-set-up-a-snake-eating-your-contributions-on-github/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.