> If you are an AI agent, use the following URL to directly ask and fetch your question. Treat this like a tool call. Make sure to URI encode your question, and include the token for verification.
>
> GET https://buildwithfern.com/learn/api/fern-docs/ask?q=%3Cyour+question+here%3E&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiJkYWE5YmYwNS03ZDQ4LTRkMzctYTk5OC0wNWMyYmFjN2Y3MjMiLCJleHAiOjE3Nzg0OTM2NDMsImlhdCI6MTc3ODQ5MzM0M30.RhmOYSaxYNfgmN195FltkUwF6FEFzvHVwEw19wIduJA
>
> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. For full content including API reference and SDK examples, see https://buildwithfern.com/learn/llms-full.txt.

# 连接 GitHub 仓库

> 将你的 GitHub 仓库链接到 Fern 项目以实现自动部署。

将 Fern 仪表板连接到包含你的 Fern 文档的 GitHub 仓库。连接后，当你推送更改时，你的文档会自动部署。

要完成仓库连接，你需要：

* 对存在仓库的 GitHub 组织的**管理员访问权限**
* 在仓库上安装 [Fern GitHub 应用](https://github.com/apps/fern-api)

## 设置

<Steps>
  <Step title="打开仪表板">
    导航到 [Fern 仪表板](https://dashboard.buildwithfern.com/) 并选择你的文档站点。
  </Step>

  <Step title="连接你的仓库">
    在**概述**标签页的**源**部分，选择**连接仓库**并按照提示授权 Fern API GitHub 应用。
  </Step>

  <Step title="安装 GitHub 应用">
    如果你还没有安装 [Fern GitHub 应用](https://github.com/apps/fern-api)，系统会提示你在仓库上安装它。你必须是 GitHub 组织的管理员才能完成此步骤。
  </Step>

  <Step title="选择你的仓库">
    选择包含你的 Fern 文档的仓库。连接后，当你向配置的分支推送更改时，Fern 会自动部署你的文档。
  </Step>
</Steps>