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
A 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:
Reads every essay from the Notion “Writing” page via the Notion API.
Converts each one to HTML using the site’s template ().
scripts/notion-sync/sync.mjsWrites one
<slug>.htmlper essay and rebuilds the list onwriting.html.Downloads images into
images/notion/<slug>/— because Notion’s own image links expire after ~1 hour, so it makes local, permanent copies.Commits the result
So edits show up within the hour, or instantly if you hit “Run workflow.”
Comments