Skip to content

Conversation

@luojiyin1987
Copy link

Summary

Add a reusable GitHub Action that generates stats cards as static SVG files and commits them to the repository. This provides a self-hosting alternative to Vercel, addressing the rate limiting issues discussed in #4748.

Features

  • 📊 Three card types: stats, repo-pins, and top-languages
  • 🚀 No external services - Uses GitHub's own file distribution
  • 🔄 Automatic updates - Runs on schedule or manually
  • 🎨 Fully customizable - All themes and options supported

Card Types

Type Description
stats GitHub stats card (stars, commits, PRs, etc.)
langs Top languages card with multiple layouts
repo Repository pin card

Usage Example

name: Update Stats Card
on:
  schedule:
    - cron: '0 */6 * * *'
  workflow_dispatch:
permissions:
  contents: write
jobs:
  update:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: anuraghazra/github-readme-stats/.github/actions/github-stats-card@master
        with:
          username: ${{ github.repository_owner }}
          card_type: stats
          token: ${{ secrets.GITHUB_TOKEN }}

Then in README:

\![Stats](./github-stats/stats.svg)

Files Added

  • .github/actions/github-stats-card/ - Reusable action source
  • .github/workflows/example-stats-card-action.yml - Example workflow

Related

Closes #4748

Add reusable GitHub Action that generates stats cards as static SVG files
and commits them to the repository. Supports stats, repo-pins, and
top-languages card types.
Add esbuild for bundling and runtime dependencies for card generation.
Bundle action source with project dependencies for standalone execution.
Add support for generating stats, repo-pins, and top-languages cards.
Reuses existing project modules for fetching and rendering.
Demonstrate generating all three card types in a single job.
@vercel
Copy link

vercel bot commented Jan 18, 2026

@luojiyin1987 is attempting to deploy a commit to the github readme stats Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the ci CI related features. label Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI related features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discussion: Deprecate Vercel hosting due to rate limiting

1 participant