generated from mintlify/starter
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 1.05 KB
/
check-mintlify-schema.yml
File metadata and controls
41 lines (32 loc) · 1.05 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
name: Check Mintlify Schema Validity
on:
schedule:
- cron: "0 9 * * 1" # Run every Monday at 9:00 AM UTC
workflow_dispatch:
env:
NODE_VERSION: "20"
SCHEMA_FILE: "/tmp/mintlify.schema.json"
jobs:
check-schema:
name: Validate Upstream Mintlify Schema
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache npm global packages
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-global-${{ runner.os }}-ajv-cli-ajv-formats
restore-keys: |
npm-global-${{ runner.os }}-
- name: Initialize project
run: npm init -y
- name: Install dependencies
run: npm install -g ajv-cli ajv-formats
- name: Download Mintlify schema
run: curl -sL https://mintlify.com/docs.json -o ${{ env.SCHEMA_FILE }}
- name: Download and validate Mintlify schema
run: npx ajv-cli compile -s ${{ env.SCHEMA_FILE }} -c ajv-formats --spec=draft7