Keep README charts in sync with a simple GitHub Action

Keep README charts in sync with a simple GitHub Action

1 4 24
calendar_today agoschedule1 min read
— Originally published at chart.devtem.org

I got tired of updating chart screenshots in READMEs by hand.

Either the numbers were stale, or I’d regenerate an image, commit it, and forget the next week. For docs and GitHub READMEs I don’t need a full chart library on the page — I need a vector file that still looks sharp.

So I wired ProvChart’s SVG API into a GitHub Action.

What it does

  1. You describe charts in .provchart/charts.json
  2. On schedule or workflow_dispatch, the Action calls the API
  3. It writes .svg files into the repo (e.g. docs/charts/)
  4. A commit step pushes them if anything changed

README stays simple:

![API traffic](./docs/charts/demo.svg)

API TRAFFIC: ProvChart SVG

No Chart.js in the README. No screenshot pipeline.

Minimal setup

Secret: PROVCHART_API_KEY (from the ProvChart dashboard)

Config (array of payloads):

[
  {
    "file": "demo.svg",
    "type": "area",
    "theme": "midnight",
    "width": 640,
    "height": 320,
    "axisX": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
    "series": [
      {
        "name": "Requests",
        "color": "#8b7bff",
        "points": [20, 85, 40, 60, 10, 40, 95]
      }
    ]
  }
]

Workflow sketch:

- uses: fscss-ttr/provchart-readme-action@v1.0.4
  with:
    api-key: ${{ secrets.PROVCHART_API_KEY }}
    config: .provchart/charts.json
    output-dir: docs/charts

Then auto-commit the docs/charts/*.svg files if you want.

Why this shape

  • SVG fits Markdown and docs better than a heavy client chart stack
  • CI owns refresh; the README only references files
  • Same JSON model as the rest of ProvChart (line, area, bar, gauge, …)

Gauges at about 220×220 work well in a README.

Try without starting from zero

Sample repo (fork → add the secret → run the workflow):

github.com/Figsh/provchart-charts

Action:

github.com/fscss-ttr/provchart-readme-action


Not a replacement for interactive dashboards. Just a practical way to keep docs charts honest without babysitting PNGs.


🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

I’m a Senior Dev and I’ve Forgotten How to Think Without a Prompt

Karol Modelski - Mar 19

TypeScript Complexity Has Finally Reached the Point of Total Absurdity

Karol Modelski - Apr 23

Why “Building in Public” Is Hollowing Out Your Developer Career

Karol Modelski - Jun 18

I built a free GitHub Action that scores your repo health — and auto-updates your README

Ossama Hashim - Apr 23

I Wrote a Script to Fix Audible's Unreadable PDF Filenames

snapsynapseverified - Apr 20
chevron_left
1.1k Points29 Badges
11Posts
7Comments
9Connections
A full-stack web developer: Building smart solutions, designing meaningful experiences, and continuo... Show more

Related Jobs

View all jobs →

Commenters (This Week)

2 comments
2 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!