Skip to content

Commit 4cd10a5

Browse files
chore: modifying doc check enforcement
1 parent 9d25098 commit 4cd10a5

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/reusable-build-test-release.yml

+21-1
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ jobs:
326326
runs-on: ubuntu-latest
327327
container:
328328
image: python:3.9
329+
outputs:
330+
status: ${{ steps.validate.outputs.status }}
329331
steps:
330332
- uses: actions/checkout@v4
331333
with:
@@ -336,8 +338,26 @@ jobs:
336338
pip install pip -U
337339
pip install mkdocs==1.6.1 mkdocs-material==9.6.9 poetry
338340
- name: validate
341+
id: validate
339342
run: |
340-
poetry run mkdocs build --strict
343+
if poetry run mkdocs build --strict; then
344+
echo "status=success" >> "$GITHUB_OUTPUT"
345+
echo "status :: success"
346+
else
347+
echo "status=failure" >> "$GITHUB_OUTPUT"
348+
echo "status :: failure"
349+
fi
350+
351+
enforce-docs-checks:
352+
runs-on: ubuntu-latest
353+
needs: validate-docs-change
354+
if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request'
355+
steps:
356+
- name: Fail if validate-docs-change failed
357+
run: |
358+
if [ "${{ needs.validate-docs-change.outputs.status }}" == "failure" ]; then
359+
exit 1
360+
fi
341361
342362
fossa-scan:
343363
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)