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 <[email protected]>
  • Loading branch information
End-rey committed Oct 29, 2024
1 parent 392d476 commit d003143
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/cli-docs-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CLI commands docs check

on:
pull_request:
branches:
- master
- support/**

jobs:
build:
runs-on: ubuntu-latest
name: cli-docs-check
steps:
- uses: actions/checkout@v4
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
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

0 comments on commit d003143

Please sign in to comment.