Keeping the Graph Green, Without Faking It


field note — brightlings-academy-kids-edu

Three scheduled GitHub Actions turn real daily maintenance into commits that legitimately count as my own contributions — no empty commits required.

before: manual, sporadic commitsafter: three daily jobs, real content only
#1f9a3 the goal

Active every day — without opening the laptop

The aim was simple to state and easy to get wrong: make the GitHub contribution graph show daily activity, without sitting down to code every single day. The constraint that matters is what makes it legitimate — every commit still has to contain a real change. Nothing manufactured just to paint a square green.

#7c2e0 how it works

GitHub Actions: a robot with a clock

GitHub Actions runs commands on GitHub’s own servers, on a timer — your machine never has to be on. Each workflow lives in .github/workflows/*.yml and is built from three pieces:

schedule: cronthe timer itself — minute, hour, day-of-month, month, weekday
workflow_dispatchadds a manual “run now” button, handy for testing without waiting for the clock
permissions: writegrants the job permission to push a commit back to the repo
#4b8d1 three jobs

What actually runs each night

WorkflowDoesTouches
daily-content.ymlRotates the quote of the day and featured testimonialdaily-content.js
sitemap.ymlRefreshes lastmod dates in the sitemapsitemap.xml
link-check.ymlVerifies every link and image still resolveslink-check.md
#a021e the honesty check

No diff, no commit

This is the line that keeps the whole thing legitimate. Every workflow runs the same guard before it’s allowed to commit:

daily-content.yml— commit step
if git diff —cached —quiet; then
  echo “No changes to commit.”
else
  git commit -m “chore: refresh quote of the day ($(date -u +%F))”
  git push
fi

git diff —cached —quiet asks one question: did anything actually change? If nothing did, the job prints a line and stops — no commit, no push, no square. The green squares that do appear are a side effect of real maintenance, not the point of it.

#5e63f whose contribution

Making the commit count as mine

Left alone, a workflow’s commit is authored by github-actions[bot] — which GitHub does not count on a profile. The fix is telling git who’s really “writing” the commit:

env— author identity
env:
  GIT_AUTHOR_NAME: {{ secrets.DAILY_COMMIT_NAME }}
  GIT_AUTHOR_EMAIL: {{ secrets.DAILY_COMMIT_EMAIL }}
secret values never appear in the workflow file itself — only their names

The email has to match a verified address on the GitHub account. That single match is what routes the commit into the profile’s graph instead of the bot’s.

#0d4a7 timing

Why the three clocks are offset

GitHub’s scheduler gets congested right at :00 and :30, so each job’s cron is nudged a few minutes past. The order is deliberate too — content first, so the sitemap’s “last modified” reflects that day’s real change, then the link check last.

18:07 UTC
content refresh
18:37 UTC
sitemap update
19:07 UTC
link check
#c99b2 glossary

Terms worth keeping

cron schedulea timer written as five numbers — minute, hour, day, month, weekday
secreta private value (name, email, token) stored in repo settings, never shown in the code
idempotent guardchecking “did anything change?” before acting, so nothing happens twice for no reason
author identitywho git credits for a commit — the thing that decides if it counts on the graph
#88f10 also shipped

Other work from this stretch

  • Replaced placeholder teacher photos with realistic headshots, plus a hover-zoom effect
  • Added a premium hero illustration to the homepage, in both language versions
  • Restructured the project into assets/css / assets/js modules, with en.html split out cleanly
  • Moved workflows onto Node LTS to clear a deprecation warning