GitHub Actions 工具,透過 GitHub GraphQL API 自動產生個人頁面統計卡片(SVG),並 commit 回儲存庫,讓你的 Profile README 保持最新狀態。
每次執行會在 output/github-profilemd-generater/<theme>/ 輸出:
| 檔案 | 說明 |
|---|---|
langcompos.svg |
語言組成圓餅圖 |
tagsstat.svg |
標籤 / 統計資訊卡片 |
同時產生 output/README.md 片段,可直接嵌入你的 Profile README。
default | solarized | solarized_dark | vue | dracula | monokai | nord_bright | nord_dark | github | github_dark
前往 Settings → Secrets and variables → Actions 新增:
| Secret 名稱 | 說明 |
|---|---|
MY_GITHUB_TOKEN |
具備 read:user 與 repo 權限的 Personal Access Token |
# .github/workflows/generate-profile.yml
name: Generate profile cards
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 1' # 每週一自動執行
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: kwangsing3/github-profilemd-Generater@release
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
with:
USERNAME: ${{ github.repository_owner }}
GITHUB_REPO_NAME: ${{ github.event.repository.name }}[](https://github.com/kwangsing3/github-profilemd-Generater)
[](https://github.com/kwangsing3/github-profilemd-Generater)npm install
npx ncc build src/index.js -o dist
node dist/index.js <username> <repo_name> <github_token>產生結果寫入 output/ 目錄。
MIT