Skip to content

RyosukeDTomita/github-grass-streak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Grass Streak

mit license codecov OpenSSF Scorecard Deno Test Create GitHub Streak SVG and Deploy to Pages

INDEX


ABOUT

Create a GitHub contribution streak badge SVG using GitHub EST API and Deno, and deploy it to GitHub Pages.

This is my example👇

GitHub Grass Streak

Why this approach?

  • Stability: Existing streak tools often rely on on-demand SVG generation via external URLs, which can occasionally fail to render.

  • Cost Free: This repository generates the SVG once per day using GitHub Actions and serves it via GitHub Pages, ensuring stable availability without any cost.


ENVIRONMENT

deno -v
deno 2.6.3

HOW TO USE

  1. Fork this repository.
  2. Go to Settings > Secrets and variables > Actions in your repository.
  3. Click New repository secret and add a Personal Access Token (with repo and read:user scopes) with the following name:
    • GH_TOKEN
  4. Check and update your GitHub username in .github/workflows/main.yml.
  5. Enable Actions and either run the Create GitHub Streak SVG workflow manually, or wait for the next scheduled run (every day at 9:00 JST).
  6. Use streak badge.
[![GitHub Grass Streak](https://ryosukedtomita.github.io/github-grass-streak/github-streak.svg)](https://github.com/RyosukeDTomita/github-grass-streak)

For Developers

  1. install deno using nix:

    nix develop
  2. create a GitHub Personal Access Token with repo and read:user scopes.

  3. add the following environment variables:

    export GH_USER="<YOUR_GITHUB_USERNAME>"
    export GH_TOKEN="<YOUR_GITHUB_TOKEN>"
  4. run the script to check if it works:

    deno run test # unit test
    deno run start
    ls github-streak.svg

About

create GitHub streak badge and host with GitHub Pages.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •