Skip to content

Commit e4305e2

Browse files
Add CODEOWNERS and docs PR quality check (#27)
1 parent 5f8462e commit e4305e2

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

.github/CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Default owner for all files
2+
* @devrimcavusoglu
3+
4+
# Docs and CI ownership
5+
/docs/ @devrimcavusoglu
6+
/.github/workflows/ @devrimcavusoglu
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Docs PR Check
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
docs-build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Detect docs changes
16+
id: docs_changes
17+
run: |
18+
BASE="${{ github.event.pull_request.base.sha }}"
19+
HEAD="${{ github.event.pull_request.head.sha }}"
20+
if git diff --name-only "$BASE" "$HEAD" | grep -E '^(docs/|\.github/workflows/docs-pr-check\.yml$)'; then
21+
echo "changed=true" >> "$GITHUB_OUTPUT"
22+
else
23+
echo "changed=false" >> "$GITHUB_OUTPUT"
24+
fi
25+
26+
- uses: actions/setup-node@v4
27+
if: steps.docs_changes.outputs.changed == 'true'
28+
with:
29+
node-version: 22
30+
cache: npm
31+
cache-dependency-path: docs/package-lock.json
32+
33+
- name: Install docs dependencies
34+
if: steps.docs_changes.outputs.changed == 'true'
35+
run: npm ci
36+
working-directory: docs
37+
38+
- name: Build docs
39+
if: steps.docs_changes.outputs.changed == 'true'
40+
run: npm run docs:build
41+
working-directory: docs
42+
43+
- name: Check generated links
44+
if: steps.docs_changes.outputs.changed == 'true'
45+
run: npx --yes linkinator docs/.vitepress/dist --recurse --silent --skip '^https?://' --skip '^mailto:' --skip '^tel:'
46+
47+
- name: Skip message
48+
if: steps.docs_changes.outputs.changed != 'true'
49+
run: echo "No docs changes detected; skipping docs build/link checks."

0 commit comments

Comments
 (0)