---
title: GitHub Integration for Docs PRs | usedocs
description: Publish usedocs gap drafts and help articles to GitHub as pull requests. OAuth or PAT setup for docs-as-code teams.
image: "https://usedocs.app/og.png"
url: "https://usedocs.app/integrations/github"
---

Integration · Updated 2026-08-12

# GitHub integration for usedocs docs publish

If documentation lives in Git, AI drafts should become PRs, not orphan Markdown in a SaaS silo. usedocs GitHub publish is built for that review culture.

Need help?

Email [hello@usedocs.app](mailto:hello@usedocs.app) for product questions, setup help, sales, partnerships, or security reports.

TL;DR

## Short answer

The GitHub integration lets docs-as-code teams open pull requests from usedocs drafts into a repository path you choose. Connect GitHub (OAuth or token), set owner/repo and docs path, then publish a draft for human review in Git — never silent pushes to main without your repo rules.

## Overview

usedocs generates drafts from content gaps and help workflows. GitHub publish sends those Markdown changes into your docs repository using a connected account with contents and pull request permissions. Branch protection and CODEOWNERS on your side remain the quality gate. Separately, product signal webhooks can open draft suggestions from PRs/releases when configured. Docs-as-code culture means every AI suggestion should look like a normal PR: small diffs, clear titles, linked gap themes in the description. Encourage CODEOWNERS for docs paths. After merge, schedule a usedocs resync so chat stops citing the old paragraph. If PR auto-drafts from product webhooks are enabled, keep their volume within plan meters and require human review before anything reaches customers.

## What this integration does

### Draft → pull request

Publish a reviewed draft into owner/repo at a configured docs path as a PR for engineering review. Keep configuration documented in your internal runbook so new teammates can reinstall the integration without reverse-engineering the dashboard.

### OAuth or PAT

Connect via GitHub OAuth app (publish) or paste a fine-grained token with least privilege. Keep configuration documented in your internal runbook so new teammates can reinstall the integration without reverse-engineering the dashboard.

### Works with gap workflow

Close the loop from unanswered chat → draft → PR → merge → re-crawl. Keep configuration documented in your internal runbook so new teammates can reinstall the integration without reverse-engineering the dashboard.

## Setup

   01

**Connect GitHub** Help center → Publish settings → Connect GitHub (or paste PAT).

   02

**Set repository and path** owner/repo, docs folder path, and base branch (for example main).

   03

**Generate or open a draft** From Monitor gaps or Help center articles, prepare Markdown you trust.

   04

**Publish to GitHub** Run publish, open the PR URL, request review, merge, then resync usedocs sources.

## Limits and plan notes

- Needs GITHUB_PUBLISH_CLIENT_* or a stored token with repo contents + PR permissions.
- Will not bypass your branch protection.
- PR auto-drafts from product webhooks are plan-metered separately.
- Never commit secrets into docs paths.

## Not for you if…

If your docs are only in a closed CMS with no Git SoR, use Notion publish or hosted help instead. If you want usedocs to auto-merge to production without humans, that is intentionally unsupported.

## FAQ

### Does usedocs push directly to main?

Publish is designed around pull requests and your repository settings — keep protection rules on.

### OAuth vs PAT?

OAuth is smoother for teams; fine-grained PATs work for locked-down orgs.

### Can it update existing files?

Publish flows target docs paths configured in settings; review the PR diff carefully.

### What about GitHub login for usedocs accounts?

Login OAuth is separate from publish OAuth — different apps/secrets.

### How do product PR webhooks differ?

Webhooks can suggest drafts when code merges; publish OAuth is for writing docs back to Git.

### Plan gates?

Advanced publish automation may be limited by plan — check usage meters.

## Connect in the dashboard

Start free, add your docs, then configure integrations under the bot settings.

				 Open dashboard

```json
[
  {
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://usedocs.app/"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Integrations",
        "item": "https://usedocs.app/integrations/"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "GitHub integration for usedocs docs publish",
        "item": "https://usedocs.app/integrations/github"
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "@type": "WebPage",
    "name": "GitHub Integration for Docs PRs | usedocs",
    "description": "Publish usedocs gap drafts and help articles to GitHub as pull requests. OAuth or PAT setup for docs-as-code teams.",
    "url": "https://usedocs.app/integrations/github",
    "dateModified": "2026-08-12"
  },
  {
    "@context": "https://schema.org",
    "@type": "FAQPage",
    "mainEntity": [
      {
        "@type": "Question",
        "name": "Does usedocs push directly to main?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Publish is designed around pull requests and your repository settings — keep protection rules on."
        }
      },
      {
        "@type": "Question",
        "name": "OAuth vs PAT?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "OAuth is smoother for teams; fine-grained PATs work for locked-down orgs."
        }
      },
      {
        "@type": "Question",
        "name": "Can it update existing files?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Publish flows target docs paths configured in settings; review the PR diff carefully."
        }
      },
      {
        "@type": "Question",
        "name": "What about GitHub login for usedocs accounts?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Login OAuth is separate from publish OAuth — different apps/secrets."
        }
      },
      {
        "@type": "Question",
        "name": "How do product PR webhooks differ?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Webhooks can suggest drafts when code merges; publish OAuth is for writing docs back to Git."
        }
      },
      {
        "@type": "Question",
        "name": "Plan gates?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Advanced publish automation may be limited by plan — check usage meters."
        }
      }
    ]
  }
]
```
