Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion editor/collaborate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
When reviewers request changes, make the requested changes and save your changes. Additional changes automatically push to the existing pull request.
</Step>
<Step title="Merge pull requests">
Merge your pull request after addressing all requested changes, required reviewers approve the pull request, and any automated checks pass.
After all requested changes are addressed and required reviewers approve the pull request, merge it to deploy your changes. You can merge approved pull requests directly from the editor by clicking **Merge and publish** in the publish popover, or merge in your Git provider.

Check warning on line 37 in editor/collaborate.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/collaborate.mdx#L37

In general, use active voice instead of passive voice ('are addressed').
</Step>
</Steps>

Expand Down
49 changes: 33 additions & 16 deletions editor/publish.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,14 @@

## Publishing workflows

The editor supports two workflows for publishing documentation updates. The workflow you use depends on your repository's branch protection rules and the branch you work on.
The editor supports multiple workflows for publishing documentation updates. The workflow you use depends on your repository's branch protection rules and the branch you work on.

**Create pull requests**: If your repository has a branch protection rule that requires pull requests before changes can merge into your deployment branch, the editor creates a pull request when you publish changes.

<Tip>
When you create a pull request from the editor, the Mintlify agent generates a title and description based on your changes. You can edit the generated title and description before creating the pull request.
</Tip>

**Publish directly**: If your repository has no branch protection rules, your changes merge to the deployment branch and deploy immediately when you publish.

| Branch type | Branch protection | Publishing workflow |
| Branch type | Branch protection | Available actions |
|-------------|-------------------|------------------------------|
| <Tooltip headline="Deployment branch" tip="The branch that publishes to your live documentation site, typically 'main'.">Deployment branch</Tooltip> | None | Commits and deploys changes |
| Deployment branch | Pull requests required | Creates a pull request |
| <Tooltip headline="Feature branch" tip="An isolated branch where you work on updates before merging to your deployment branch.">Feature branch</Tooltip> | None | Merges changes to deployment branch and deploys changes |
| Feature branch | Pull requests required | Creates a pull request |
| <Tooltip headline="Deployment branch" tip="The branch that publishes to your live documentation site, typically 'main'.">Deployment branch</Tooltip> | None | Publish directly |
| Deployment branch | Pull requests required | Create a branch to make changes |
| <Tooltip headline="Feature branch" tip="An isolated branch where you work on updates before merging to your deployment branch.">Feature branch</Tooltip> | None | Save in branch, create a pull request |
| Feature branch | Pull requests required | Save in branch, create a pull request |

<Tip>
Configure branch protection rules in your Git provider to require pull requests. See [About protected branches](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches) in the GitHub docs or [Protected branches](https://docs.gitlab.com/user/project/repository/branches/protected/) in the GitLab docs.
Expand Down Expand Up @@ -56,14 +48,39 @@

## Publish your changes

Click **Publish** in the toolbar. Depending on your workflow, your changes deploy immediately or create a pull request for you to merge in your Git provider. If you are on a feature branch, save your changes before publishing.
Click the publish button in the toolbar to open the publish popover. The actions available depend on your branch and branch protection rules.

- **Publish**: On the deployment branch without branch protections, click **Publish** to commit and deploy your changes immediately.
- **Save in branch**: On a feature branch, click **Save in branch** to commit your changes to the current branch.
- **Create branch**: On a protected deployment branch, click **Create branch** to move your changes to a new branch.
- **Create pull request**: On a feature branch, click **Create pull request** to open a pull request targeting your deployment branch.

<Tip>
When you create a pull request from the editor, you can set a title and description before creating it.
</Tip>

If there are no pending changes or a pull request for the current branch is already open, the **Publish** button is unclickable.
If there are no pending changes, the publish and save actions are disabled.

Check warning on line 62 in editor/publish.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/publish.mdx#L62

In general, use active voice instead of passive voice ('are disabled').

<Note>
Your live documentation site updates after Mintlify builds and deploys your published changes. This typically takes 30 seconds to a few minutes. Check the deployment status of your changes on your [dashboard](https://dashboard.mintlify.com).
</Note>

## Review and merge pull requests

When a pull request is open for the current branch, the publish popover shows its review status:

- **Approved**: The pull request has been approved and is ready to merge.

Check warning on line 72 in editor/publish.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/publish.mdx#L72

In general, use active voice instead of passive voice ('been approved').
- **Changes requested**: A reviewer requested changes before the pull request can merge.
- **Awaiting review**: The pull request is waiting for a review.

Click **View request** to open the pull request in your Git provider.

If the pull request is approved, click **Merge and publish** to merge the pull request and deploy changes to your live documentation directly from the editor. After merging, the editor switches to your deployment branch.

Check warning on line 78 in editor/publish.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/publish.mdx#L78

In general, use active voice instead of passive voice ('is approved').

<Note>
If your repository requires approvals before merging, **Merge and publish** is only available after the pull request is approved.

Check warning on line 81 in editor/publish.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/publish.mdx#L81

In general, use active voice instead of passive voice ('is approved').
</Note>

## Resolve conflicts

Conflicts occur when your branch and the deployment branch have incompatible changes to the same files.
Expand Down
2 changes: 1 addition & 1 deletion guides/branches.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Branches let you create separate instances of your documentation to make changes, get reviews, and try new approaches before publishing. Your team can work on branches to update different parts of your documentation simultaneously without affecting what users see on your live site.

The following diagram shows an example of a branch workflow where a feature branch is created, changes are made, and then the feature branch is merged into the main branch.

Check warning on line 11 in guides/branches.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/branches.mdx#L11

In general, use active voice instead of passive voice ('is created').

Check warning on line 11 in guides/branches.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/branches.mdx#L11

In general, use active voice instead of passive voice ('are made').

Check warning on line 11 in guides/branches.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/branches.mdx#L11

In general, use active voice instead of passive voice ('is merged').

```mermaid
gitGraph
Expand Down Expand Up @@ -79,7 +79,7 @@

<Tabs>
<Tab title="Using web editor">
Select the **Save as commit** button in the top-right of the editor toolbar. This creates a commit and pushes your work to your branch automatically.
Click the publish button in the top-right of the editor toolbar and select **Save in branch**. This creates a commit and pushes your work to your branch automatically.
</Tab>
<Tab title="Using local development">
Stage, commit, and push your changes.
Expand Down
15 changes: 7 additions & 8 deletions guides/git-concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@
- **Save changes**: The editor makes a commit with your changes, preserving your work in the project history.
- **Create a branch**: The editor creates a new branch in your repository that anyone with access to the repository can use to collaborate and review changes.
- **Publish on your deployment branch**: The editor commits and pushes directly to your deployment branch, which publishes your changes immediately.
- **Publish on other branches**: The editor creates a pull request, which allows you to get feedback from others before merging your changes into your deployment branch.
- **Save on other branches**: The editor commits your changes to the branch. You can then create a pull request from the editor to propose merging your changes into the deployment branch.
- **Merge pull requests**: The editor lets you merge approved pull requests directly, deploying your changes without leaving the editor.

## Common workflows

Expand All @@ -149,13 +150,11 @@

<Tabs>
<Tab title="Using web editor">
<Note>
To create pull requests from the web editor, you must have a branch protection rule enabled that requires pull requests before changes can merge into your deployment branch. Without branch protection rules, changes on branches merge to your deployment branch when published.
</Note>
1. Create branch from the branch dropdown in the editor toolbar.
2. Make and save changes on the branch.
3. Click **Publish** to create a pull request.
4. Merge the pull request when ready.
1. Create a branch from the branch dropdown in the editor toolbar.
2. Make changes on the branch.
3. Click the publish button and select **Save in branch** to commit your changes.
4. Click **Create pull request** to propose merging your changes.
5. After the pull request is approved, click **Merge and publish** to deploy your changes.

Check warning on line 157 in guides/git-concepts.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/git-concepts.mdx#L157

In general, use active voice instead of passive voice ('is approved').
</Tab>
<Tab title="Using local development">
1. Create a branch: `git checkout -b feature-name`
Expand Down
Loading