---
title: "Connect your site's GitHub repository"
description: "Connect the repository your site is built from: Website autopilot changes its pages by pull request, and articles publish to its blog when it has one."
url: https://help.rankprompt.com/en/articles/114-connect-your-site-s-github-repository
collection: "Integrations"
updated: 2026-10-31
language: en
---

# Connect your site's GitHub repository

Connect the repository your site is built from: Website autopilot changes its pages by pull request, and articles publish to its blog when it has one.

## What it does

When your site is built from a repository (Astro, Next.js, Hugo, Jekyll, Docusaurus, Gatsby and similar), Rank Prompt connects to it as your site. Website autopilot changes the real files of its pages, and that needs no blog. If the repository has a blog, Rank Prompt also reads how its posts are written (the posts folder, the file name, the frontmatter keys, images, languages and the address a post goes live at) and writes each article the same way.

Everything arrives on a new branch as a pull request you review. The change goes live when you merge it. The one exception is full autonomy in Website autopilot, where Rank Prompt merges its own pull request once the repository's checks pass, and leaves it for you when a check fails.

* * *

## What you need

-   The repository connected on the **GitHub** card in **Integrations > Publish content** (the **+** on the card; the gear on the repository row changes the repository, the folder the agent may touch and the account)
    
-   Starter or a higher plan on the brand owner, and you must own the brand to set it up
    

* * *

## Reading the repository

1.  Open **Integrations > Publish content**. The **GitHub** card names the connected repository and says **Repository not read yet**. Without a repository, click **+** on the card to connect one.
    
2.  Click **Read the repository**. Rank Prompt reads it and shows **Site connected** with the framework and the site's address. With a blog it also shows **Blog ready** with the posts folder, and **How each article lands in this repo**:
    
    -   **Saved as**: the file a post becomes, like `src/content/blog/{locale}/{slug}.mdx`
        
    -   **Sent as**: a pull request into your branch, or a direct commit
        
    -   **Published at**: the address of a merged post, like `{site}/blog/{slug}`
        
    -   the frontmatter a post carries, how images are handled and the languages
        
3.  **What we read** lists the files it read and how sure it is.
    
4.  Click **Edit** to correct anything. **Repository settings** open with the site (**Site URL**, **Branch**), where posts go (**File path**, **Live URL**) and how they arrive (**Pull request** or **Direct commit**); format, images, languages and frontmatter sit under one more click. **Read again** later replaces what was read but keeps your corrections, the branch and how posts arrive.
    

A site address is needed to match your pages and give a published post its link. If none was found, the card says **Site address missing**: add it with **Edit**.

Editors of the brand see the card and what was read, without the buttons.

* * *

## A repository without a blog

A repository without a blog still connects as your site, and Website autopilot works on it. Only articles need a blog: the card says **No blog**, and the repository is not offered as a place to publish them. For Astro, Next.js, Hugo and Jekyll, **Add a blog** opens a pull request that adds one following the repository's own layout, and articles publish here once it merges. For other frameworks, **Edit** lets you say where posts go.

* * *

## Publishing

Open an article, click **More actions** (the three dots) and **Publish**, and pick the repository.

-   **Publish** opens a pull request. The success window says **Pull request opened** with a **Review PR** button, and the publish window shows **Waiting for merge** until it merges.
    
-   **Save as draft** opens a draft pull request, to preview the post. Publishing the article later marks it ready.
    
-   **Schedule** opens nothing until the time comes.
    
-   Publishing again while the pull request is open adds a commit to it. Publishing a live post again opens a new pull request that updates the same file.
    
-   With **Direct commit** as the delivery, a live publish is committed to the branch and goes live with your next deploy, with nothing to merge.
    

A pull request closed without merging leaves the article as a draft. On the **Articles** list, an article waiting for its merge shows the **Review pull request** action, and the **Calendar** shows it as **Waiting for merge**.

### City pages

When Rank Prompt reads your repository it also looks for where your site keeps pages, and a city page from **Business Profile > City pages** goes there as a file at its planned address, through the same pull request or direct commit as a post:

-   **Astro**: the folder of the content collection a catch-all route (`src/pages/[...slug].astro`) renders, or Markdown pages in `src/pages` with the layout your existing Markdown pages use.
    
-   **Next.js**: `app/{address}/page.mdx` when your config takes MDX pages, or the content folder a catch-all route (`app/[...slug]/page.tsx`) reads.
    
-   **Docusaurus**: `src/pages/{address}.md`.
    
-   **Jekyll**: `{address}/index.md` with your page layout and the address as its permalink.
    

The file carries the page's title and description the way your other pages do. A file already at that path that Rank Prompt did not write is never replaced or renamed around: the publish stops and names it. A repository where none of these is found (Hugo and Gatsby among them) takes the city page as a blog post.

* * *

## Autopilot and links back

A repository works as the destination of **Content > Autopilot**: each article waits in its pull request and counts as published once it merges. Links back from your related posts cannot be edited into the repository from here, so they come as tasks with the sentence to paste.

* * *

## Asking the agent

The agent can read the repository for you ("read my repo") and open the pull request that adds a blog ("add a blog to my site"). Both need the brand owner.

* * *

## Troubleshooting

### The pull request did not open

Check that the Rank Prompt GitHub App still has access to the repository, then publish again.

### The post went live at a different address

Correct **Live URL** or **Site URL** with **Edit**; the next publish uses it.

* * *

## Next steps

-   [Publishing your content](https://help.rankprompt.com/en/articles/53-publishing-your-content.md)
    
-   [Integrations overview](https://help.rankprompt.com/en/articles/56-integrations-overview.md)
    

* * *

## Questions?

Email [support@rankprompt.com](mailto:support@rankprompt.com) and I'll help.
