Skip to content

Commit 86c4f82

Browse files
authored
ci: check that API references do not cause Docusaurus build failures (#437)
* draft * trigger * simplify * simplify more * no checksum script * no trigger * refinement * use 3.13
1 parent b3eef64 commit 86c4f82

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Check API reference changes
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "haystack_experimental/**/*.py"
7+
- "pydoc/*.yml"
8+
9+
jobs:
10+
test-api-reference-build:
11+
runs-on: ubuntu-slim
12+
steps:
13+
- uses: actions/checkout@v6
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v6
17+
with:
18+
python-version: "3.13"
19+
20+
- name: Install Hatch
21+
run: pip install --upgrade hatch
22+
23+
- name: Generate API references
24+
run: hatch run docs
25+
26+
- name: Set up Node.js
27+
uses: actions/setup-node@v6
28+
with:
29+
node-version: "22"
30+
31+
- name: Run Docusaurus md/mdx checker
32+
working-directory: pydoc/temp
33+
run: |
34+
npx docusaurus-mdx-checker -v || {
35+
echo ""
36+
echo "For common MDX problems, see https://docusaurus.io/blog/preparing-your-site-for-docusaurus-v3#common-mdx-problems"
37+
exit 1
38+
}

0 commit comments

Comments
 (0)