1. Genereer de kaarten in CI of lokaal.
  2. Publiceer de bestanden naar een branch, een artefact of een openbare map.
  3. Sluit de gepubliceerde bestanden in je profiel-README in.

GitHub Action

Deze workflow rendert elke dag vier kaarten en commit ze via publish_branch naar de branch output, waarbij de vorige commit wordt vervangen zodat de repository klein blijft. Elke configuratieoptie is ook een Action-input, en de jobsamenvatting toont voorbeelden met README-fragmenten.

.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

Insluiten in de README

Vervang <user> door je GitHub-gebruikersnaam. Gebruik één afbeelding per kaart, of layout: dashboard voor één afbeelding.

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

Sla een token met de scopes read_user en read_api op als CI-variabele 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

Schrijf een startconfiguratie, genereer lokaal, probeer thema's zonder token of bekijk een voorbeeld van een configuratie.

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