- Go to GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens
- Click "Generate new token"
- Name it:
METRICS_TOKEN - Set expiration: No expiration (or 1 year)
- Set repository access to this repository (
whozahm3d/whozahm3d) - Grant repository permissions:
- ✅ Contents: Read and write
- Grant account permissions:
- ✅ Profile: Read-only
- ✅ Metadata: Read-only
- Click Generate token — copy it immediately, you won't see it again
- Go to your
whozahm3dprofile repository on GitHubThis is the special repo with the same name as your username:
github.com/whozahm3d/whozahm3d - Go to Settings → Secrets and variables → Actions
- Click "New repository secret"
- Name:
METRICS_TOKEN - Value: paste the token you copied
- Click Add secret
Copy .github/workflows/generate-stats.yml from this ZIP into your profile repo.
The folder structure should be:
whozahm3d/ ← your profile repo root
├── README.md
├── assets/ ← will be auto-created by the Action
│ ├── stats.svg
│ ├── languages.svg
│ └── calendar.svg
└── .github/
└── workflows/
└── generate-stats.yml
- Go to your repo → Actions tab
- Click "Generate GitHub Stats" in the left sidebar
- Click "Run workflow" → "Run workflow"
- Wait ~2–3 minutes for it to complete
- The
assets/folder will appear in your repo with 3 SVG files - Your README will now display them as static images — always loaded, zero dependency on external servers
The workflow runs automatically every 12 hours and on every push to main.
No maintenance needed.
| Problem | Fix |
|---|---|
| Action fails with "legacy or invalid token" | Regenerate a fine-grained PAT (github_pat_...) and save it as METRICS_TOKEN |
| Action fails with "403 forbidden" | Token permissions are wrong — ensure Contents: Read and write plus profile/metadata read access |
| Action fails with "Resource not accessible" | Go to repo Settings → Actions → General → set Workflow permissions to "Read and write" |
| SVGs show but look wrong | Run the workflow again manually; first run sometimes has caching issues |