[DOCS-1442] Self-Managed deployment guide revamp #893
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: Validate MDX | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: validate-mdx-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| validate-mdx: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| - name: Get npm paths and cache key | |
| id: npm-config | |
| run: | | |
| echo "date=$(date +%Y)-$(( $(date +%j) / 4 ))" >> "$GITHUB_OUTPUT" | |
| echo "npm_prefix=$(npm config get prefix)" >> "$GITHUB_OUTPUT" | |
| echo "npm_cache=$(npm config get cache)" >> "$GITHUB_OUTPUT" | |
| - name: Cache Mintlify CLI | |
| id: cache-mint | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ${{ steps.npm-config.outputs.npm_cache }} | |
| ${{ steps.npm-config.outputs.npm_prefix }}/lib/node_modules/mint | |
| ${{ steps.npm-config.outputs.npm_prefix }}/bin/mint | |
| # 4-day cache - expires every 4 days to get latest mint version | |
| key: ${{ runner.os }}-mint-${{ steps.npm-config.outputs.date }} | |
| restore-keys: | | |
| ${{ runner.os }}-mint- | |
| - name: Install Mintlify CLI (latest) | |
| if: steps.cache-mint.outputs.cache-hit != 'true' | |
| run: npm install -g mint@latest --loglevel=error --no-fund --no-audit | |
| - name: Verify Mintlify CLI (from cache) | |
| if: steps.cache-mint.outputs.cache-hit == 'true' | |
| run: | | |
| echo "Using cached Mintlify CLI" | |
| mint --version | |
| - name: Validate MDX with Mintlify | |
| run: ./scripts/mdx-validation/validate-mdx-mintlify.sh |