1. צרו את הכרטיסים ב־CI או מקומית.
  2. פרסמו את הקבצים בענף, בארטיפקט או בתיקייה ציבורית.
  3. הטמיעו את הקבצים שפורסמו ב־README של הפרופיל שלכם.

GitHub Action

תהליך העבודה הזה מציג ארבעה כרטיסים כל יום ומבצע להם קומיט לענף output דרך publish_branch, תוך החלפת הקומיט הקודם כדי שהמאגר יישאר קטן. כל אפשרות תצורה היא גם קלט של ה־Action, וסיכום המשימה מציג תצוגות מקדימות עם קטעי README.

.github/workflows/profile-graphics.yml
name: Generate profile graphics

on:
  schedule:
    - cron: "0 0 * * *"
  workflow_dispatch:

jobs:
  generate:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v7
      - uses: mikhailkhorokhorin/profile-graphics@v1
        with:
          user: ${{ github.repository_owner }}
          token: ${{ secrets.GITHUB_TOKEN }}
          charts: streak,summary,langs,calendar
          publish_branch: output

הטמעה ב־README

החליפו את <user> בשם המשתמש שלכם ב־GitHub. השתמשו בתמונה אחת לכל כרטיס, או ב־layout: dashboard לתמונה אחת.

README.md
![Streak](https://raw.githubusercontent.com/<user>/<user>/output/streak.svg)
![Summary](https://raw.githubusercontent.com/<user>/<user>/output/summary.svg)
![Languages](https://raw.githubusercontent.com/<user>/<user>/output/langs.svg)
![Calendar](https://raw.githubusercontent.com/<user>/<user>/output/calendar.svg)

GitLab CI

שמרו טוקן עם ההרשאות read_user ו־read_api כמשתנה ה־CI GITLAB_TOKEN.

.gitlab-ci.yml
stages:
  - generate

generate-profile-graphics:
  image: node:22
  stage: generate
  script:
    - npm install -g profile-graphics
    - profile-graphics generate --provider gitlab --user "$GITLAB_USER_LOGIN" --token "$GITLAB_TOKEN" --output public/cards
  artifacts:
    paths:
      - public/cards

CLI

כתבו תצורה התחלתית, צרו מקומית, נסו ערכות נושא בלי טוקן או הציגו תצורה בתצוגה מקדימה.

shell
npm install -g profile-graphics
profile-graphics init --user octocat
profile-graphics generate --user octocat --token "$GITHUB_TOKEN" --charts streak,langs --output dist
profile-graphics demo --theme tokyo-night --output dist/demo
profile-graphics preview --config profile-graphics.yml --demo