The GitHub connection commits generated articles as markdown files into a repository you choose. It exists for sites that build from git — Next.js, Astro, Hugo, Jekyll, and any headless setup where a committed file becomes a page on the next deploy.
Articles carry front matter (title, description, date, slug), so common static-site generators pick them up without glue code.
What to know before you start
Connect it when your site deploys from a repository and your posts are files. If your site has a CMS with an API, prefer that platform's connection — committing to git puts your build pipeline between the publish and the live page.
Connect GitHub
To connect GitHub:
- Create a GitHub token with access to the target repository. A fine-grained token scoped to just that repo is the right shape.
- In your project's
Integrationstab, choose GitHub, paste the token, and set the repository and the content path where posts belong (for example,content/blog). - Send a test publish and confirm the file appears in the repo, then let your site build.
What happens after you publish
Each published article is a commit, and your deployment turns it into a page. That's why verification treats GitHub differently: a repository file URL always resolves even when your site's page doesn't, so publish verification → doesn't mark GitHub publishes as live based on the repo URL. Reachability of the final page is your build's responsibility.
Limits and usage
- The token needs repository write access and nothing else. Scoping it to one repo limits the blast radius of a leak.
- The file lands where the connection's path setting points. Generators differ on paths and front-matter keys, so adjust the path to your project's convention.
- Renaming or moving published files later is yours to manage in git.
If something isn't working
The commit exists but no page appeared. Your site didn't rebuild, or the generator ignored the file (wrong path or a front-matter mismatch). Check the deploy log for the commit.
The API returns a 404 on publish. Fine-grained tokens must explicitly list the repository — a token without that repo reads as not-found rather than forbidden.
You see duplicate posts after retries. The same article publishes to the same path, so a retry overwrites rather than duplicates. Two different slugs for one article means the slug changed between attempts — delete the stray file.
Related guides
- Use the Next.js blog package — the companion for Next.js sites.
- Publish via webhook
- Why "published" means reachable