|
33 | 33 | - name: Run Tests |
34 | 34 | run: yarn test |
35 | 35 |
|
| 36 | + docs-check: |
| 37 | + name: Documentation Validation |
| 38 | + runs-on: ubuntu-latest |
| 39 | + defaults: |
| 40 | + run: |
| 41 | + working-directory: docs |
| 42 | + steps: |
| 43 | + - name: Checkout Repo |
| 44 | + uses: actions/checkout@v4 |
| 45 | + with: |
| 46 | + fetch-depth: 0 |
| 47 | + |
| 48 | + - name: Check for docs changes |
| 49 | + id: docs-changes |
| 50 | + working-directory: . |
| 51 | + run: | |
| 52 | + DOCS_CHANGED=$(git diff --name-only origin/main...HEAD -- docs/ | grep '\.md$' || true) |
| 53 | + if [ -z "$DOCS_CHANGED" ]; then |
| 54 | + echo "skip=true" >> "$GITHUB_OUTPUT" |
| 55 | + echo "No markdown changes in docs/" |
| 56 | + else |
| 57 | + echo "skip=false" >> "$GITHUB_OUTPUT" |
| 58 | + DELIM=$(openssl rand -hex 8) |
| 59 | + echo "changed_files<<$DELIM" >> "$GITHUB_OUTPUT" |
| 60 | + echo "$DOCS_CHANGED" >> "$GITHUB_OUTPUT" |
| 61 | + echo "$DELIM" >> "$GITHUB_OUTPUT" |
| 62 | + echo "Changed docs files:" |
| 63 | + echo "$DOCS_CHANGED" |
| 64 | + fi |
| 65 | +
|
| 66 | + - name: Setup Node.js |
| 67 | + if: steps.docs-changes.outputs.skip != 'true' |
| 68 | + uses: actions/setup-node@v4 |
| 69 | + with: |
| 70 | + node-version: "22" |
| 71 | + |
| 72 | + - name: Enable Corepack |
| 73 | + if: steps.docs-changes.outputs.skip != 'true' |
| 74 | + run: corepack enable |
| 75 | + |
| 76 | + - name: Install docs dependencies |
| 77 | + if: steps.docs-changes.outputs.skip != 'true' |
| 78 | + run: yarn install --immutable |
| 79 | + |
| 80 | + - name: Build documentation (validates internal links) |
| 81 | + if: steps.docs-changes.outputs.skip != 'true' |
| 82 | + run: yarn build |
| 83 | + |
| 84 | + - name: Check external links in changed files |
| 85 | + if: steps.docs-changes.outputs.skip != 'true' |
| 86 | + run: | |
| 87 | + FILES=$(echo "${{ steps.docs-changes.outputs.changed_files }}" | sed 's|^docs/||' | xargs) |
| 88 | + echo "Checking files: $FILES" |
| 89 | + yarn markdown-link-check --config .markdown-link-check.json $FILES |
| 90 | +
|
36 | 91 | version-check: |
37 | 92 | name: Version Bump Check |
38 | 93 | runs-on: ubuntu-latest |
|
0 commit comments