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.
What is On-Demand ISR?
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.
Key Features
- GitHub App webhook integration — the demo subscribes to Issues events and sends them to the site's
/api/webhookendpoint. - On-demand revalidation — uses Next.js's unstable_revalidate (as documented under fetching, caching, and revalidating) to update the static page without redeploying.
- One-click Vercel deployment — the included Vercel button clones the repository and prompts for
GITHUB_WEBHOOK_SECRET,GITHUB_APP_ID, andGITHUB_APP_PK_PEMenvironment variables. - Local development — the project runs with
bun dev, the Bun runtime, for a fast local server. - Step-by-step setup guide — the README walks through creating a GitHub App, setting the homepage and webhook URL, generating a private key, and installing the app on a repository.
- Live demo — the repository links to a deployed demo at on-demand-isr.vercel.app that works with GitHub Issues.
Who should use On-Demand ISR?
- Next.js developers who want to learn how to implement on-demand revalidation for static pages that need frequent updates.
- Teams that manage content through GitHub Issues and want their deployed site to reflect new issues automatically when they're created.
- Vercel users looking for an official reference pattern for wiring GitHub App webhooks to serverless functions and fetching data revalidation.
Use cases
- Content sites driven by GitHub Issues: add an issue to your repository and the static page updates itself minutes later, without a manual deploy.
- Learning revalidation in Next.js: the boilerplate is a small, readable example of the "Revalidating data" pattern from the Next.js docs.
- Prototyping webhook workflows: use the
/api/webhookroute as a starting point for other GitHub events.
How does On-Demand ISR work?
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.
FAQ
Is on-demand ISR free to use?
The repository itself is open source and the demo runs on Vercel's free tier, but no pricing details are provided in the README.
What Next.js version does this use?
The demo description says Next.js 12.1, and the project links to the current Next.js docs for revalidation.
Do I need a GitHub App?
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.
Can I run it without Vercel?
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.








