Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/content-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Content Check

on:
pull_request:
paths:
- '**/*.md'
- '**/*.mdx'
- 'contentlayer.config.ts'
- 'package.json'
- 'pnpm-lock.yaml'
- 'next.config.mjs'
- 'postcss.config.mjs'
- 'tailwind.config.ts'
- 'tsconfig.json'

jobs:
check-content:
runs-on: ubuntu-latest
env:
NEXT_TELEMETRY_DISABLED: '1'
CI: 'true'
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 10

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- run: pnpm install --frozen-lockfile
- run: pnpm run check:content
Comment on lines +34 to +35

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Avoid CI step that always crashes

The new content-check job runs pnpm run check:content, which currently crashes in this repo with TypeError: The "code" argument must be of type number. Received an instance of Object from the Contentlayer CLI. Because the command exits with an exception even after generating documents, this workflow will fail for every pull request that touches docs regardless of content validity. CI will therefore block all such PRs until the underlying command is adjusted (e.g., by upgrading Contentlayer or invoking a different check that exits cleanly).

Useful? React with 👍 / 👎.


3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
"start": "next start",
"check:content": "contentlayer build"
},
"dependencies": {
"next": "^15.5.3",
Expand Down