> ## Documentation Index
> Fetch the complete documentation index at: https://learn.mintlify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get connected

> How to create your documentation repository, install the Mintlify GitHub app, and get your site live for the first time.

export const Quiz = ({question, answers, correctFeedback, incorrectFeedback}) => {
  const [selected, setSelected] = React.useState(null);
  const [checked, setChecked] = React.useState(false);
  const quizId = React.useId();
  const isCorrect = checked && answers[selected]?.correct;
  const reset = () => {
    setSelected(null);
    setChecked(false);
  };
  return <div className={"quiz-container" + (checked ? " quiz-checked" : "")}>
      <Badge color="green">Quiz</Badge>
      <p className="quiz-question" id={quizId + "-question"}>{question}</p>
      <div className="quiz-options" role="radiogroup" aria-labelledby={quizId + "-question"} aria-disabled={checked}>
        {answers.map((answer, i) => <label key={i} className={["quiz-option", !checked && selected === i ? "quiz-option-selected" : "", checked && answer.correct ? "quiz-option-correct" : "", checked && selected === i && !answer.correct ? "quiz-option-incorrect" : ""].filter(Boolean).join(" ")}>
            <input type="radio" name={"quiz-" + quizId} checked={selected === i} onChange={() => !checked && setSelected(i)} disabled={checked} />
            <span className="quiz-radio" />
            <span className="quiz-option-label">{answer.text}</span>
          </label>)}
      </div>
      {checked && <div className={"quiz-feedback " + (isCorrect ? "quiz-feedback-correct" : "quiz-feedback-incorrect")} role="status" aria-live="polite" aria-atomic="true">
          <span className="quiz-feedback-icon">{isCorrect ? "✓" : "✗"}</span>
          {isCorrect ? correctFeedback : incorrectFeedback}
        </div>}
      <div className="quiz-actions">
        {!checked ? <button className="quiz-btn quiz-btn-check" type="button" onClick={() => selected !== null && setChecked(true)} disabled={selected === null}>
            Check answer
          </button> : <button className="quiz-btn quiz-btn-reset" type="button" onClick={reset}>
            Try again
          </button>}
      </div>
    </div>;
};

Git tracks your changes. GitHub is where your team collaborates on them. On GitHub, you create pull requests, the Mintlify bot runs checks, and preview deployments are generated before anything goes live.

Before you can publish documentation with Mintlify, two things need to be in place: a GitHub repository to store your content, and the Mintlify GitHub app installed so that Mintlify can detect changes and rebuild your site automatically.

This lesson walks through getting both set up from scratch.

## Create your Mintlify account

Go to [mintlify.com/start](https://mintlify.com/start) and sign up. During onboarding, you'll connect your GitHub account, which lets Mintlify read your repository and deploy your site when changes are merged.

If you don't have a GitHub account yet, you'll need to create one first. A free account is all you need.

## Set up your repository

When you connect your GitHub account, Mintlify gives you two options:

**Let Mintlify create a repository for you.** Mintlify creates a private repository, installs the GitHub app, and configures everything automatically. Your site is live within minutes. This is the fastest way to get started, and you can always rename the repository or transfer it to your organization later.

**Connect an existing repository.** If you already have a GitHub repository where your documentation should live, you can connect it instead. Mintlify will walk you through installing the GitHub app on that repository.

Either way, once the connection is made, Mintlify deploys your documentation site automatically. You'll find the URL — something like `your-project.mintlify.app` — on the Overview page of your Mintlify [dashboard](https://dashboard.mintlify.com).

## What the GitHub app does

The Mintlify GitHub app is what makes the workflow function. When it's installed on your repository, it:

* **Rebuilds your site automatically** when changes are merged into your main branch
* **Generates a preview deployment** for every pull request, so you can review changes before they go live
* **Runs checks** on pull requests to catch issues like broken links or missing metadata before they reach your live site

Without the GitHub app, Mintlify has no way to know when your repository changes. Installing it is a one-time step. After that, the connection is maintained automatically.

## What's in your repository

Once your repository is set up, it contains at minimum a `docs.json` file and an initial page. The `docs.json` file is the configuration file for your Mintlify site. It controls your navigation structure, site name, colors, and other settings. Every page you add, every section you create, starts here.

<Quiz
  question="What does the Mintlify GitHub app do automatically when you merge a pull request?"
  answers={[
{ text: "Sends an email notification to your team", correct: false },
{ text: "Creates a backup of your previous site", correct: false },
{ text: "Opens a new pull request with a summary of the changes", correct: false },
{ text: "Rebuilds your documentation site with the merged changes", correct: true },
]}
  correctFeedback="Right. The Mintlify GitHub app watches your repository and rebuilds your live site automatically whenever changes are merged into your main branch. You don't have to trigger a deploy manually."
  incorrectFeedback="The Mintlify GitHub app's main job is to rebuild your documentation site when changes are merged. It also generates preview deployments for pull requests and runs checks — but the automatic rebuild on merge is what keeps your live site in sync with your repository."
/>

From this point, you're ready to start editing. Next up: [Access and permissions](/courses/git-github/access-and-permissions). Understand who can do what in your repository, and how to make sure the right people have the right level of access.
