Skip to content

Sync OpenAPI specs from PR #2324 #106

Sync OpenAPI specs from PR #2324

Sync OpenAPI specs from PR #2324 #106

name: Validate Mintlify Documentation
on:
pull_request:
paths:
- .github/workflows/mintlify-validate.yml
- "**/*.mdx"
- "**/*.md"
- "docs.json"
- "mint.json"
- "**/openapi.yaml"
- "**/openapi.yml"
- "**/openapi.json"
push:
branches:
- main
- master
env:
NODE_VERSION: "20"
jobs:
validate:
name: ${{ matrix.validation.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
validation:
- name: "Check Broken Links"
target: "validate-broken-links"
- name: "Check Accessibility"
target: "validate-accessibility"
- name: "Validate OpenAPI Specs"
target: "validate-openapi"
- name: "Validate Schema"
target: "validate-schema"
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- name: Install dependencies
run: npm install
- name: Cache Nx
uses: actions/cache@v4
with:
path: .nx/cache
key: nx-${{ runner.os }}-${{ hashFiles('**/nx.json', '**/project.json') }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
nx-${{ runner.os }}-${{ hashFiles('**/nx.json', '**/project.json') }}-
nx-${{ runner.os }}-
- name: Run validation
run: npx nx ${{ matrix.validation.target }}
summary:
name: Validation Summary
runs-on: ubuntu-latest
needs: [validate]
if: always()
steps:
- name: Generate Summary
run: |
echo "## Validation Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ needs.validate.result }}" == "success" ]; then
echo "✅ **All Validations**: Passed" >> $GITHUB_STEP_SUMMARY
else
echo "❌ **Some Validations**: Failed" >> $GITHUB_STEP_SUMMARY
fi