Skip to main content

How to Publish to GitHub

Publish content from GRRO directly to a GitHub repository as markdown files. Ideal for static sites, Next.js blogs, and any site that deploys from Git.

Written by Jason
Updated this week

GRRO can publish content directly to a GitHub repository as markdown files. This is ideal for static sites, Next.js blogs, or any site that deploys from a Git repo.​


Where to configure

Go to Settings > CMS Connections in the left sidebar.


What you need

  • A GitHub Personal Access Token with the repo scope

  • The repository owner (your GitHub username or organization)

  • The repository name

  • The branch to commit to (e.g., main)

  • The content directory (e.g., content/posts)

  • (Optional) An index file path (e.g., data/blogIndex.ts)

How to create a Personal Access Token

  1. Go to https://github.com/settings/tokens

  2. Click Generate new token (classic)

  3. Give it a name (e.g., "GRRO Publishing")

  4. Select the repo scope

  5. Click Generate token

  6. Copy the token immediately (you will not see it again)


How to connect

  1. In GRRO, go to Settings > CMS Connections

  2. Click Add Connection and select GitHub

  3. Enter your token, repository owner, repository name, branch, and content directory

  4. (Optional) Enter an index file path if your site uses one

  5. Click Test Connection to verify

  6. Click Save


What happens when you publish

  1. GRRO converts your content from the Content Editor to Markdown format (headings, bold, italic, links, images, tables, lists, code blocks, and blockquotes are all supported).​

  2. The markdown file is committed to your specified content directory with YAML frontmatter (title, date, slug, excerpt).​

  3. If you specified an index file, GRRO automatically updates it to include the new post.

  4. The commit triggers your deployment pipeline (Vercel, Railway, Netlify, etc.) to rebuild your site.​


Index file auto-update

If your site uses an index file to register blog posts (like a blogIndex.ts that imports markdown files), GRRO will automatically add the new post's import and include it in the exports. This means your new post goes live without any manual file editing.​


Publishing from the Content Editor

  1. Open your draft in the Content Editor

  2. Click Publish

  3. Select your GitHub connection

  4. Confirm

GRRO will warn you if the content scores below 85 before publishing.


Security

Your GitHub token is encrypted with AES-256-GCM before storage and is never displayed after saving. All content is sanitized before committing.


Troubleshooting

Test Connection failed.
Make sure your Personal Access Token has the repo scope and has not expired. Also verify the repository owner and name are correct.​

The post did not appear on my site.
Check your repository for the new commit. If the commit is there but the site did not update, check your deployment pipeline (Vercel, Netlify, etc.) for build errors.​

The index file was not updated.
Make sure the index file path in your CMS connection settings matches the actual path in your repository.

Did this answer your question?