Skip to content

Commit de4cfab

Browse files
committed
ci: check for uncommitted website/static/api.json diffs
Now that we're checking in the `api.json` content generated by the `docgen` tool the expectation is that there shouldn't be any uncommitted diffs when running the tool fresh in CI.
1 parent f8866ac commit de4cfab

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/docs.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,14 @@ jobs:
2929
with:
3030
tool: zola@0.19.1 # Matched to rustls repo
3131

32-
- name: Generate API JSON data
33-
run:
34-
cargo run -p rustls-ffi-tools --bin docgen > website/static/api.json
32+
- name: Verify API docs JSON data
33+
run: |
34+
if ! diff website/static/api.json <(cargo run -p rustls-ffi-tools --bin docgen 2>/dev/null); then
35+
echo
36+
echo "ERROR: Generated api.json differs from checked-in version"
37+
echo "Run 'cargo run -p rustls-ffi-tools --bin docgen > website/static/api.json' and commit the changes"
38+
exit 1
39+
fi
3540
3641
- name: Generate site pages
3742
run: |

0 commit comments

Comments
 (0)