Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Demo of on-demand Incremental Static Regeneration in Next.js using GitHub Issues to trigger static page updates.
On-Demand ISR is a Next.js boilerplate from Vercel that demonstrates how to regenerate static pages instantly when new content is added, using GitHub Issue webhooks instead of a full redeploy.
On-Demand ISR (Incremental Static Regeneration) is a reference implementation by Vercel that shows how to update static pages on demand. The app runs on Next.js 12.1 and listens for GitHub Issue events via a GitHub App; when a new issue is created, a webhook hits the /api/webhook endpoint and triggers revalidation of the static page. Its inputs are a GitHub webhook payload and its output is a regenerated static page.
/api/webhook endpoint.GITHUB_WEBHOOK_SECRET, GITHUB_APP_ID, and GITHUB_APP_PK_PEM environment variables.bun dev, the Bun runtime, for a fast local server./api/webhook route as a starting point for other GitHub events.The README describes a five-step setup: create a GitHub App with a webhook URL pointing to your site, store the secret as GITHUB_WEBHOOK_SECRET, add the App ID, generate a private key and store it as GITHUB_APP_PK_PEM, then install the app on your repository. After that, creating a new issue triggers the webhook, which revalidates the static page.
The repository itself is open source and the demo runs on Vercel's free tier, but no pricing details are provided in the README.
The demo description says Next.js 12.1, and the project links to the current Next.js docs for revalidation.
Yes, the setup requires creating a GitHub App with "Read Only" access to Issues and subscribing to Issues events, then installing it on the repository.
The code is a standard Next.js app that can be run locally with bun dev, so it should work on any platform that supports Next.js, though the deploy button is Vercel-specific.
