> ## 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

> Connect a GitHub repository so Mintlify can build and deploy your documentation.

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>;
};

Mintlify needs two things from GitHub: a repository containing your documentation and permission to read and deploy it. The Mintlify GitHub app provides that connection.

By the end of this lesson, a push to your configured deployment branch will trigger a Mintlify deployment.

## Start with a repository

Go to [mintlify.com/start](https://mintlify.com/start) and follow the onboarding flow. You can connect a repository you already own or use the repository option offered during onboarding.

If you connect an existing repository, make sure it contains—or will contain—your Mintlify project. At minimum, the project needs a `docs.json` configuration file and a page included in its navigation.

The GitHub account completing this setup must be allowed to install or request the Mintlify GitHub app for the repository. In an organization, an owner may need to approve the installation.

## Choose the repository Mintlify can access

During installation, GitHub asks which repositories the Mintlify app can access. Grant access to the documentation repository. You can update that selection later in the GitHub app settings if the repository changes.

Mintlify uses the connection to:

* Read the documentation source
* Deploy changes pushed to the configured deployment branch
* Create preview deployments for pull requests
* Create branches and pull requests from the web editor
* Report configured checks in GitHub

Granting access only to the repositories Mintlify needs keeps the integration's scope easy to understand.

## Confirm the source and deployment

In your Mintlify dashboard, open **Git Settings** and confirm the organization, repository, and deployment branch. The deployment branch is often `main`, but use whatever branch your team has configured.

After the first successful build, open the site URL from the dashboard. If the repository is connected but changes don't deploy, check these three things first:

1. The commit reached the configured deployment branch.
2. The GitHub app still has access to the repository.
3. The latest deployment in the dashboard completed successfully.

You can find the full installation and permission details in the [GitHub deployment guide](https://www.mintlify.com/docs/deploy/github).

<Quiz
  question="A commit reached your deployment branch, but Mintlify did not start a new deployment. What should you check first?"
  answers={[
{ text: "Whether the Mintlify GitHub app still has access to the repository", correct: true },
{ text: "Whether every contributor has repository admin access", correct: false },
{ text: "Whether the feature branch was deleted", correct: false },
{ text: "Whether the commit message mentions Mintlify", correct: false },
]}
  correctFeedback="Right. Mintlify relies on the GitHub app connection to detect repository updates and start deployments."
  incorrectFeedback="Check the GitHub app connection first. If the app cannot access the repository, Mintlify cannot detect the new commit."
/>

Next up: [Access and permissions](/courses/git-github/access-and-permissions) — identify whether a GitHub or Mintlify role is blocking the work.
