Skip to content

Commit 76b584d

Browse files
m1a2sttedyu
authored andcommitted
KAFKA-18241: add docs check to CI (apache#18183)
Reviewers: Chia-Ping Tsai <[email protected]>, David Arthur <[email protected]>
1 parent 83815b5 commit 76b584d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
# --scan: Publish the build scan. This will only work on PRs from apache/kafka and trunk
118118
# --no-scan: For public fork PRs, we won't attempt to publish the scan
119119
run: |
120-
./gradlew --build-cache --info $SCAN_ARG check -x test
120+
./gradlew --build-cache --info $SCAN_ARG check siteDocTar -x test
121121
- name: Archive check reports
122122
if: always()
123123
uses: actions/upload-artifact@v4
@@ -137,6 +137,16 @@ jobs:
137137
run: python .github/scripts/rat.py
138138
env:
139139
GITHUB_WORKSPACE: ${{ github.workspace }}
140+
- name: Check generated documentation
141+
# Check if there are any empty files under ./site-docs/generated, If any empty files are found, print an error
142+
# message and list the empty files
143+
run: |
144+
tar zxvf core/build/distributions/kafka_2.13-$(./gradlew properties | grep version: | awk '{print $NF}' | head -n 1)-site-docs.tgz
145+
if find ./site-docs/generated -type f -exec grep -L "." {} \; | grep -q "."; then
146+
echo "One or more documentation files are empty!" >&2
147+
find ./site-docs/generated -type f -exec grep -L "." {} \; >&2
148+
exit 1
149+
fi
140150
141151
test:
142152
needs: [validate, load-catalog]

0 commit comments

Comments
 (0)