-
Notifications
You must be signed in to change notification settings - Fork 8
48 lines (40 loc) · 1.24 KB
/
docs-ci.yml
File metadata and controls
48 lines (40 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Docs Check
on:
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
broken-links-and-openapi:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'workflow_dispatch' || github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- name: Checkout lance-namespace (upstream spec)
uses: actions/checkout@v4
with:
repository: lance-format/lance-namespace
ref: main
path: lance-namespace
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Copy lance-namespace REST API spec
run: |
set -euo pipefail
test -s lance-namespace/docs/src/rest.yaml
cp lance-namespace/docs/src/rest.yaml docs/api-reference/rest/openapi.yml
- name: Install Mintlify CLI
run: npm install -g mintlify@latest
- name: Check broken links
run: |
set -euo pipefail
if command -v mint >/dev/null 2>&1; then
(cd docs && mint broken-links)
elif command -v mintlify >/dev/null 2>&1; then
(cd docs && mintlify broken-links)
else
(cd docs && npx -y mintlify@latest broken-links)
fi