Why do I need this

This is specifically for how my blog is set up. This blog uses GitHub issues as a CMS. One issue with a specific label in the GitHub repo corresponds to one blog post.

In a typical SSG Next.js site, a build is triggered when you push to a specific branch. But for this site's blog, my posts don't live inside the codebase. They are issues on the GitHuB repo, so a Vercel deploy won't be triggered if I add a new issue.

What I did

So what I did was create a webhook for this GitHub repo, which would send a POST request to a specified URL whenever I make changes to an issue or create a new one. POST requests would be sent to an endpoint provided by Vercel. Vercel calls it Deploy Hooks

image

Complete walkthrough

TODO