Skip to content

Commit 52600a0

Browse files
committed
add ci checks page, add to mint.json
1 parent 048eaaa commit 52600a0

File tree

2 files changed

+114
-0
lines changed

2 files changed

+114
-0
lines changed

mint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"settings/add-members",
119119
"settings/github",
120120
"settings/gitlab",
121+
"settings/ci",
121122
"settings/preview-deployments"
122123
]
123124
},

settings/ci.mdx

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
title: CI/CD
3+
description: "Use Mintlify's CI tools to check your docs"
4+
icon: 'circle-check'
5+
---
6+
7+
<Warning>
8+
This feature is only available for customers using GitHub. If you'd like it enabled for other platforms, please provide [feedback](https://feedback.mintlify.com/roadmap).
9+
</Warning>
10+
11+
Mintlify is capable of using its installed Github App to check your docs for errors, and gives you warnings before you deploy.
12+
13+
## Installation
14+
15+
To begin, will need to have followed the steps on the [GitHub](/settings/github) page.
16+
17+
For GitHub Apps, you can choose to only give permissions to a single repository.
18+
We highly recommend you do so as we only need access to the repository where
19+
your docs are hosted.
20+
21+
## Configuration
22+
23+
You can configure the CI checks enabled for a deployment on the Mintlify dashboard by navigating to the 'Add-Ons' tab. There you can enable or disable the checks you'd like to run.
24+
25+
When enabling checks, you can choose to run them at a `Warning` or `Blocking` level.
26+
27+
<Note>
28+
29+
30+
A `Blocking` level check will provide a failure status if not passed, or changes are suggested.<br/>
31+
32+
A `Warning` level check will never provide a failure status, even if there is an error or suggestions.
33+
34+
</Note>
35+
36+
## When Do They Run?
37+
38+
CI checks are configured to run on commits to your configured deployment branch, or on pull requests against that branch.
39+
40+
## Available CI Checks
41+
42+
### Broken Links
43+
44+
Similarly to how the [CLI link checker](/settings/broken-links#broken-links) works on your local machine, we will automatically check your docs for broken links.
45+
To see the results of this check, you can visit GitHub's check results page for a specific commit.
46+
47+
### Vale
48+
49+
[Vale](https://vale.sh/) is an open-source rule-based prose linter which supports a range of document types, including Markdown and MDX.
50+
51+
Mintlify supports automatically running Vale in a CI check, and displaying the results as a check status.
52+
53+
#### Configuration
54+
If you have a `.vale.ini` file in the root the content directory for your deployment, we will automatically use that configuration file.
55+
We will also automatically use any configuration files in your specified `stylesPath`.
56+
57+
<Tip>Don't have a Vale config or not sure where to get started? Don't worry, Mintlify has a default configuration that will automatically be used if one is not provided.</Tip>
58+
59+
<Warning>
60+
Please note that for security reasons, we are unable to support any absolute `stylesPath`, or `stylesPath` which include `..` values. Please use relative paths and include the `stylesPath` in your repository.
61+
</Warning>
62+
63+
#### Packages
64+
Vale supports a range of [packages](https://vale.sh/docs/keys/packages), which can be used to check for spelling and style errors.
65+
Any packages you include in your repository under the correct `stylesPath` will be automatically installed and used in your Vale configuration.
66+
67+
For packages not included in your repository, you may specify any packages from the [Vale package registry](https://vale.sh/explorer), and they will automatically be downloaded and used in your Vale configuration.
68+
69+
<Warning>
70+
Please note that for security reasons, we are unable to support automatically downloading packages that are not from the [Vale package registry](https://vale.sh/explorer).
71+
</Warning>
72+
73+
#### Vale with MDX
74+
Vale does not natively support MDX, but Vale's author has provided a [custom extension](https://github.com/errata-ai/MDX) to support it.
75+
76+
If you'd prefer not to use this extension, we recommend the following lines in your `.vale.ini` file:
77+
```ini
78+
[formats]
79+
mdx = md
80+
81+
[*.mdx]
82+
CommentDelimiters = {/*, */}
83+
84+
TokenIgnores = (?sm)((?:import|export) .+?$), \
85+
(?<!`)(<\w+ ?.+ ?\/>)(?!`), \
86+
(<[A-Z]\w+>.+?<\/[A-Z]\w+>)
87+
88+
BlockIgnores = (?sm)^(<\w+\n .*\s\/>)$, \
89+
(?sm)^({.+.*})
90+
```
91+
92+
To use Vale's in-document comments, use MDX-style comments `{/* ... */}`.
93+
If you use the `CommentDelimiters = {/*, */}` [setting](https://vale.sh/docs/keys/commentdelimiters) in your configuration, Vale will automatically interpret these comments while linting.
94+
This means you can easily use Vale's in-built features, like skipping lines or sections.
95+
96+
```mdx
97+
{/* vale off */}
98+
99+
This text will be ignored by Vale
100+
101+
{/* vale on */}
102+
```
103+
104+
105+
If you choose not to use `CommentDelimiters`, but still choose to use Vale's comments, you must wrap any Vale comments in MDX comments `{/* ... */}`. For example:
106+
107+
```mdx
108+
{/* <!-- vale off --> */}
109+
110+
This text will be ignored by Vale
111+
112+
{/* <!-- vale on --> */}
113+
```

0 commit comments

Comments
 (0)