How to automatically update your website from notion

Last updated 2026-07-08

I love notion. This page and all of my other essaysare updated from my Notion database automatically. You can link your notion & website in a ways such that GitHub Action polls Notion every hour (/other increment of time), pulls every row/page, and publishes each one as its own page on the site plus updates the menu list.

my GitHub setup

GitHub Action (.github/workflows/notion-sync.yml) runs once an hour (and you can trigger it on-demand from the repo’s Actions tab). Each run:

  1. Reads every essay from the Notion “Writing” page via the Notion API.

  2. Converts each one to HTML using the site’s template ().

    scripts/notion-sync/sync.mjs

  3. Writes one <slug>.html per essay and rebuilds the list on writing.html.

  4. Downloads images into images/notion/<slug>/ — because Notion’s own image links expire after ~1 hour, so it makes local, permanent copies.

  5. Commits the result

So edits show up within the hour, or instantly if you hit “Run workflow.”

Comments