Skip to content

fix(docs): re-fetch Notra posts on every build + webhook trigger - #113

Merged
leoisadev1 merged 1 commit into
mainfrom
posthog-code/notra-auto-refresh
Jun 28, 2026
Merged

leoisadev1 merged 1 commit into
mainfrom
posthog-code/notra-auto-refresh

Conversation

@leoisadev1

Copy link
Copy Markdown
Member

Follow-up to #110 so newly published Notra posts actually reach the live blog.

Problem

The blog is static. A rebuild of the same commit can hit the turbo/Vercel build cache and skip the Notra fetch, so a published post never appears (only a forced no-cache build picked it up).

Changes

  • apps/fumadocs/turbo.json — disables build caching for the docs app only, so every deploy re-runs fetch-notra-posts.ts. Verified: turbo reports cache bypass, force executing and the build re-fetches.
  • Refresh workflow — adds a repository_dispatch (notra-published) trigger so a Notra publish webhook can fire a near-instant rebuild, plus a daily safety-net rebuild. No-ops cleanly until VERCEL_DEPLOY_HOOK_URL is set.

To finish enabling hands-off auto-publish

Create a Vercel Deploy Hook (Settings -> Git -> Deploy Hooks, branch main) and set it as the VERCEL_DEPLOY_HOOK_URL repo secret; optionally point a Notra publish webhook at it (or at GitHub repository_dispatch) for instant updates.


Created with PostHog Code

apps/fumadocs/turbo.json turns off build caching for the docs app so each deploy
re-runs the Notra fetch instead of serving a cached build. Otherwise a rebuild of
the same commit can turbo-cache-hit and the blog never updates when new posts are
published (only a forced no-cache build would pick them up).

The refresh workflow also accepts a repository_dispatch "notra-published" event so
a Notra publish webhook can trigger a near-instant rebuild, plus a daily safety net.

Generated-By: PostHog Code
Task-Id: b674afbd-54f5-4303-ac9f-edf84b4622af
@vercel

vercel Bot commented Jun 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
email-sdk-fumadocs Ready Ready Preview, Comment Jun 28, 2026 2:38am

@leoisadev1
leoisadev1 merged commit 86781f9 into main Jun 28, 2026
4 checks passed
@leoisadev1
leoisadev1 deleted the posthog-code/notra-auto-refresh branch June 28, 2026 02:40
@greptile-apps

greptile-apps Bot commented Jun 28, 2026

Copy link
Copy Markdown

Greptile Summary

This PR makes the static Notra blog refresh more reliably. The main changes are:

  • Adds a repository_dispatch trigger for notra-published events.
  • Changes the scheduled refresh from weekly to daily.
  • Adds a docs-app Turborepo config that disables build caching for apps/fumadocs.

Confidence Score: 5/5

The changes are limited to docs build refresh configuration and a GitHub Actions workflow trigger.

The modified files are small and scoped, with no application runtime or security-sensitive code paths changed.

T-Rex T-Rex Logs

What T-Rex did

  • Ran two dry-run commands to compare turbo-cache behavior between base and head worktrees, and observed a change in the cache setting for fumadocs#build from true to false while using the same filter/package scenario and both runs exiting with code 0.
  • Loaded and compared the workflow refresh harness between base and head, and saw that the after state reports repository_dispatch_present=True, repository_dispatch_type_notra_published=True, daily_30_13_present=True, and shell_exit_code=0.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "fix(docs): re-fetch Notra posts on every..." | Re-trigger Greptile

This branch was successfully deployed

1 active deployment
Preview — 30deddd7 Deployed Jun 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant