# Connect your website on GitHub

> Pick the GitHub repository your website is built from, so page changes arrive as pull requests you review and merge.

Connect the GitHub repository your website is built from, and your content agent reads your pages from it, including your blog posts, so its drafts match [how your blog is written](/docs/work/knowledge#how-your-blog-is-written). Each change it makes, a new page, a refresh or a set of small fixes, arrives as a pull request: your own checks and preview run on it, and nothing reaches your site until you merge it. Changes an agent proposes never create, edit or delete your CI workflows or git hooks (files under *.github*, for example), so your checks run as you set them.

GitHub is one of the choices under **Where pages go** in **Settings** → **Project** (see [Project settings](/docs/settings/project_settings#where-pages-go)). New pages arrive as pull requests while **GitHub** is picked there and your repo is picked here. Until you pick anything, a picked repo counts as **GitHub**.

GitHub is optional for new pages. With another choice, or without a repo, an approved page plan still goes ahead: the agent writes each page as a finished draft in your Library and, when your site's Framer, Webflow or WordPress is connected, proposes it there as a draft you publish yourself (see [Page plans](/docs/work/library#page-plans)). Site fixes, such as the SEO agent's title and description fixes, go ahead without a repo too: the agent reads each page as it is live and writes that page's fixes as one paste-ready draft in your Library (new title, meta description, H1, changed sections and internal links). You paste them into your site, then mark the draft published (see [Drafts wait on your decision](/docs/work/library#drafts-wait-on-your-decision)).

## Before you start

GitHub must be turned on for your organization. If you don't see it under **Settings** → **Apps**, ask your administrator. Each project connects its own GitHub.

## Connect GitHub and pick the repository

1. **Open GitHub**

   Go to **Settings** → **Apps** and open **GitHub**.
2. **Connect**

   Select **Connect** and sign in on GitHub's own page. You can pick from the repositories that GitHub account can reach. A repository owned by a company account on GitHub may need that account's approval on GitHub first.
3. **Pick your website's repo**

   Once GitHub is connected, **Your website's repo** shows. Choose the **Repository**. **Branch pull requests go into** fills in with the repository's default branch; change it if you need to. If your pages live in one folder, enter it under **Where pages live (optional)**.
4. **Save**

   Select **Save**. The page names the agents that can now open pull requests there, and says merging still asks you unless you change *Merge a pull request*. If no agent changes your site yet, it says *No agent changes the site yet, so nobody was given access.*
5. **Send new pages to GitHub**

   If you picked another option under **Where pages go** in **Settings** → **Project**, pick **GitHub** there.

> **Note:** The list shows only the 100 most recently updated repositories the account can reach. If yours is missing, push a commit to it on GitHub so it moves up the list, then open the picker again.

After you save, the agent reads the repository in the background, and reads it again each time it prepares a change. Picking another repository or branch starts a fresh read. The tag next to **Your website's repo** reads **Not picked** until you save a repository, then **Picked**, and the picker shows *Last read* with the commit and how long ago. In the list, a private repository reads, for example, *northwind/website (private)*. To stop using the repository, select **Stop using it**.

If the list says *Couldn't list your repositories:* with a reason, check the GitHub connection under **Settings** → **Apps** and open the picker again.

> **Tip:** An older link to your site settings now opens the **GitHub** app under **Settings** → **Apps**.

## Review a change

When a change is ready, it shows in the agent's chat and in **Library** → **Pages**, where **Review the change** opens it.

1. **Approve**

   In the review, select **Approve** to open the pull request on its own branch, or **Decline**. Nothing reaches your site yet.
2. **Check it**

   In **Library** → **Pages**, the change links to the **Pull request**, shows how its checks went and links to the **Preview**. When available, **See the changes** shows what changed (**Hide the changes** folds it away), and **Check log** shows the check's output (**Hide the log**).
3. **Merge**

   Select **Merge** when it looks right, in **Library** → **Pages** or on the merge card in the agent's chat (which offers **Merge** or **Close it**). Its 14- and 28-day results are measured from the merge.

- **Ask for changes** opens a box: say what should change and select *Ask* with the agent's name. It opens a chat with your message filled in; send it. The agent also reads comments on the pull request, and its fix lands on the same pull request, so one **Merge** covers both.
- **Close it** turns the change down. Give a short reason; the agent learns from it. The pull request stays open in GitHub until you close it there.

You can also merge in GitHub as usual. The change shows as **Merged** here by the next day.

## When a check fails

A change whose check failed isn't offered to you. The card says *The check failed, so this change isn't offered to you.* Select **Show the log** to see why, or ask the agent to fix it from the card; send the message it fills in.

## When there's no Merge button

If the agent can't propose the merge (for example, its GitHub access changed), the card says to merge it in GitHub. It shows as merged here by the next day.

## Let merges go out without asking

Merging is the GitHub action *Merge a pull request*. Open the agent, select **Settings** → **Apps and access**, and set that action to **Auto run** to merge without asking. See [Approvals](/docs/basics/approvals#let-an-action-run-on-its-own).
