Skip to content

Commit 43f7eee

Browse files
docs: fix docs build (#1336)
* docs: fix docs build * docs: conditional pre-commit * fix: included more LLM exclude patterns * fix: iclude docs:build --------- Co-authored-by: Brian <bmadcode@gmail.com>
1 parent 96f21be commit 43f7eee

5 files changed

Lines changed: 48 additions & 5 deletions

File tree

.github/workflows/quality.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,27 @@ jobs:
6969
- name: markdownlint
7070
run: npm run lint:md
7171

72+
docs:
73+
runs-on: ubuntu-latest
74+
steps:
75+
- name: Checkout
76+
uses: actions/checkout@v4
77+
78+
- name: Setup Node
79+
uses: actions/setup-node@v4
80+
with:
81+
node-version-file: ".nvmrc"
82+
cache: "npm"
83+
84+
- name: Install dependencies
85+
run: npm ci
86+
87+
- name: Validate documentation links
88+
run: npm run docs:validate-links
89+
90+
- name: Build documentation
91+
run: npm run docs:build
92+
7293
validate:
7394
runs-on: ubuntu-latest
7495
steps:

.husky/pre-commit

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,16 @@ npx --no-install lint-staged
55

66
# Validate everything
77
npm test
8+
9+
# Validate docs links only when docs change
10+
if command -v rg >/dev/null 2>&1; then
11+
if git diff --cached --name-only | rg -q '^docs/'; then
12+
npm run docs:validate-links
13+
npm run docs:build
14+
fi
15+
else
16+
if git diff --cached --name-only | grep -Eq '^docs/'; then
17+
npm run docs:validate-links
18+
npm run docs:build
19+
fi
20+
fi

docs/explanation/tea/risk-based-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Risk scores inform test priorities (but aren't the only factor):
250250
- **Test Levels:** E2E smoke test only
251251
- **Example:** Theme customization, experimental features
252252

253-
**Note:** Priorities consider risk scores plus business context (usage frequency, user impact, etc.). See [Test Priorities Matrix](/docs/reference/tea/knowledge-base.md#test-priorities-matrix) for complete criteria.
253+
**Note:** Priorities consider risk scores plus business context (usage frequency, user impact, etc.). See [Test Priorities Matrix](/docs/reference/tea/knowledge-base.md#quality-standards) for complete criteria.
254254

255255
### 3. Mitigation Plans
256256

docs/explanation/tea/test-quality-standards.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,8 +866,8 @@ test('should work with optional button', async ({ page }) => {
866866
## Technical Implementation
867867

868868
For detailed test quality patterns, see:
869-
- [Test Quality Fragment](/docs/reference/tea/knowledge-base.md#test-quality)
870-
- [Test Levels Framework Fragment](/docs/reference/tea/knowledge-base.md#test-levels-framework)
869+
- [Test Quality Fragment](/docs/reference/tea/knowledge-base.md#quality-standards)
870+
- [Test Levels Framework Fragment](/docs/reference/tea/knowledge-base.md#quality-standards)
871871
- [Complete Knowledge Base Index](/docs/reference/tea/knowledge-base.md)
872872

873873
## Related Concepts

tools/build-docs.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,17 @@ const REPO_URL = 'https://github.com/bmad-code-org/BMAD-METHOD';
2727
const LLM_MAX_CHARS = 600_000;
2828
const LLM_WARN_CHARS = 500_000;
2929

30-
const LLM_EXCLUDE_PATTERNS = ['changelog', 'ide-info/', 'v4-to-v6-upgrade', 'downloads/', 'faq'];
30+
const LLM_EXCLUDE_PATTERNS = [
31+
'changelog',
32+
'ide-info/',
33+
'v4-to-v6-upgrade',
34+
'downloads/',
35+
'faq',
36+
'_STYLE_GUIDE.md',
37+
'_archive/',
38+
'reference/glossary/',
39+
'explanation/game-dev/',
40+
];
3141

3242
// =============================================================================
3343
// Main Entry Point
@@ -335,7 +345,6 @@ function runAstroBuild() {
335345
stdio: 'inherit',
336346
env: {
337347
...process.env,
338-
NODE_OPTIONS: `${process.env.NODE_OPTIONS || ''} --disable-warning=MODULE_TYPELESS_PACKAGE_JSON`.trim(),
339348
},
340349
});
341350
}

0 commit comments

Comments
 (0)