How to add a snake game to your Github page (2024)
Create a repository with your username . Github will tell you that
It is a ✨special ✨ repository that you can use to add a README.md to your GitHub profile. Make sure it’s public and initialize it with a README to get started.
If you like my read me style, you can find it here. The snake game is just a svg file, you can get it in README.
Please replace the {username} in the above link for yourself.
Go you your tab Actions in your README repository and create a New Workflow. Click the New workflow button, and last the set up workflow yourself link.
This will generate a new folder in your repository called .github/workflows and a new file inside of it called main.yml.
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 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# push the content of <build_dir> to a branch # the content will be available at https://raw.githubusercontent.com/<github_user>/<repository>/<target_branch>/<file> , or as github page - 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 }}
Go to the Action tab, you will see the workflow named generate animation click it, and the Run Workflow.
If the workflow run successfully, you will get the svg file in the codes under the output branch, which config in the main.yml.
Snake is a fun game to make as it doesn't require a lot of code (less than 100 lines with all comments removed). This is a basic implementation of the snake game, but it's missing a few things intentionally and they're left as further exploration for the reader.
Snake is a fun game to make as it doesn't require a lot of code (less than 100 lines with all comments removed). This is a basic implementation of the snake game, but it's missing a few things intentionally and they're left as further exploration for the reader.
If you add a README file to the root of a public repository with the same name as your username, that README will automatically appear on your profile page. You can edit your profile README with GitHub Flavored Markdown to create a personalized section on your profile.
You can see your contributions over time by either clicking Show more activity at the bottom of your contribution activity or by clicking the year you're interested in viewing on the right side of the page.
On your repo that you want to add the icons to, create an issue. Drag and drop the icon file into the issue window. Wait for it to download, then it will give you a link. Copy and paste this link into your Readme file at the location you want the icon to appear.
In the top right corner of GitHub, click your profile photo, then click Your profile. Above the contribution calendar, click Contribution settings. Click Private contributions to show or hide private contributions on your profile.
In the search field, start typing the name of person you want to invite, then click a name in the list of matches.Click Add NAME to REPOSITORY. The user will receive an email inviting them to the repository. Once they accept your invitation, they will have collaborator access to your repository.
Address: Suite 609 315 Lupita Unions, Ronnieburgh, MI 62697
Phone: +2424755286529
Job: District Education Designer
Hobby: Yoga, Gunsmithing, Singing, 3D printing, Nordic skating, Soapmaking, Juggling
Introduction: My name is Moshe Kshlerin, I am a gleaming, attractive, outstanding, pleasant, delightful, outstanding, famous person who loves writing and wants to share my knowledge and understanding with you.
We notice you're using an ad blocker
Without advertising income, we can't keep making this site awesome for you.