Deploy a site
Runmint deploy from the documentation directory. The directory must contain a docs.json file.
https://<subdomain>.mintlify.site and prints a hosted Git repository URL and a short-lived write token. It does not upload files. The agent then:
- Clones the hosted repository into a separate directory, passing the write token as an
Authorization: Bearerheader for that Git process only. - Copies
docs.json, pages, and assets into the repository root. - Commits and pushes to
main. The push starts a build.
mint deploy again from the same directory to get a fresh write token, or pass --new --subdomain <name> to create another site.
Deploy on every push from GitHub
If your documentation lives in a GitHub repository,mint deploy --github sets up a workflow that deploys the site on every push to the repository’s default branch. The workflow authenticates with GitHub’s OIDC identity token, so the repository doesn’t store any secrets.
--github requires a GitHub origin remote and the GitHub CLI signed in with access to the repository.
- Provisions the site, or reuses the site from an earlier
mint deployin the same directory. - Trusts the repository and its default branch to deploy the site.
- Writes
.github/workflows/mintlify.ymlat the repository root.
mint deploy in GitHub Actions, which pushes the checked-out commit to the site.
If your docs live in a subdirectory, run the command from the repository root and pass the subdirectory with --directory. The subdirectory becomes the site root, and the workflow only runs when files in that subdirectory or the workflow itself change.
.github/workflows/mintlify.yml already exists with different contents, the command stops. Pass --force to overwrite it.
--github only works for unclaimed sites. To deploy a claimed site from GitHub, connect the repository from the dashboard.Claim the site
A site created withmint deploy expires unless a person claims it. When you claim a site, you become an admin of the site’s organization, so you can manage it from the dashboard.
-
The agent asks which email address should own the site, then runs:
To get the link in the same step, run
mint deploy --email <email>instead. - Open the claim link.
- Sign in to Mintlify or create an account.
- Copy and paste the displayed code back to the agent.
-
The agent finishes the claim with that code:
mint claim commands from the same directory as mint deploy, or pass --directory. The CLI stores the agent’s credentials and reads them during the claim, so agents shouldn’t read or print them.
After you claim a site, the claim page links to the dashboard and the live site.
Use auth.md without the CLI
Agents that can’t install the CLI can followhttps://mintlify.com/auth.md. It describes the same flow as raw HTTP requests: register an anonymous agent identity, provision a site, and hand the account to a person through the claim page.