Check Mintlify Schema Validity #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |