Skip to content

Commit

Permalink
workflows: add a check to update cli commands docs when changes occur
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Butusov <andrey@nspcc.io>
  • Loading branch information
End-rey committed Oct 29, 2024
1 parent d003143 commit 0eed63a
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/cli-docs-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,9 @@ jobs:
with:
fetch-depth: 0

- name: Save current CLI docs files
run: |
mkdir -p backup_docs
cp -r docs/cli-commands/* backup_docs/
- name: Generate new CLI doc files
run: make cli-gendoc

- name: Compare CLI docs files
- name: Check for documentation changes
run: |
DIFF_OUTPUT=$(diff -ur docs/cli-commands backup_docs || true)
if [ -n "$DIFF_OUTPUT" ]; then
echo "CLI documentation has not been updated correctly. Differences:"
echo "$DIFF_OUTPUT"
exit 1
fi
git diff --exit-code -- docs/cli-commands/ || (echo "CLI documentation has not been updated correctly. Differences:" && git diff -- docs/cli-commands/)

0 comments on commit 0eed63a

Please sign in to comment.