Skip to content

Commit b799ab9

Browse files
authored
Merge pull request #4187 from dvdksn/docs/validate-markdown
ci: add validation for generated docs
2 parents 90f17f3 + 341c843 commit b799ab9

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

.github/workflows/validate.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,33 @@ jobs:
2929
-
3030
name: Checkout
3131
uses: actions/checkout@v3
32-
with:
33-
fetch-depth: 0
3432
-
3533
name: Run
3634
uses: docker/bake-action@v2
3735
with:
3836
targets: ${{ matrix.target }}
3937

38+
# check that the generated Markdown and the checked-in files match
39+
validate-md:
40+
runs-on: ubuntu-20.04
41+
steps:
42+
-
43+
name: Checkout
44+
uses: actions/checkout@v3
45+
-
46+
name: Generate
47+
shell: 'script --return --quiet --command "bash {0}"'
48+
run: |
49+
make -f docker.Makefile mddocs
50+
-
51+
name: Validate
52+
run: |
53+
if [[ $(git diff --stat) != '' ]]; then
54+
echo 'fail: generated files do not match checked-in files'
55+
git --no-pager diff
56+
exit 1
57+
fi
58+
4059
validate-make:
4160
runs-on: ubuntu-20.04
4261
strategy:
@@ -49,8 +68,6 @@ jobs:
4968
-
5069
name: Checkout
5170
uses: actions/checkout@v3
52-
with:
53-
fetch-depth: 0
5471
-
5572
name: Run
5673
shell: 'script --return --quiet --command "bash {0}"'

0 commit comments

Comments
 (0)