feat(docs): serve the Prisma Next error reference, with anchors matching emitted docsUrls #2
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: Error Reference Check | |
| # The published error-reference page must list every structured error code the | |
| # product (prisma/prisma main) can emit β each emitted error links to | |
| # /docs/orm/next/reference/error-reference#<CODE>. This check fails if any | |
| # known code is missing from the page, even if the sync workflow breaks. | |
| # | |
| # Runs on pushes to main, on PRs that touch the page or its tooling, and on a | |
| # daily schedule so drift introduced upstream is flagged without blocking | |
| # unrelated PRs. | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| paths: | |
| - apps/docs/content/docs/orm/next/reference/error-reference.mdx | |
| - apps/docs/scripts/generate-error-reference.mjs | |
| - .github/workflows/error-reference-check.yml | |
| - .github/workflows/sync-error-reference-docs.yml | |
| schedule: | |
| - cron: "30 6 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| verify: | |
| name: Verify error-reference completeness | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Checkout prisma/prisma (main) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: prisma/prisma | |
| ref: main | |
| path: prisma-src | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Verify page lists every known error code | |
| run: node prisma-src/scripts/list-error-codes.mjs --root prisma-src --verify apps/docs/content/docs/orm/next/reference/error-reference.mdx |