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 392d476 commit 0a176b7
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/cli-docs-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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: Get current CLI doc files
id: current-docs-diff
uses: tj-actions/changed-files@v42
with:
files: docs/cli-commands/**

- name: Generate new CLI doc files
run: make gendoc

- name: Check if CLI docs are up-to-date
if: steps.current-docs-diff.outputs.has_changed == 'true'
run: |
git diff --exit-code docs/cli-commands || (echo 'CLI documentation has not been updated' && exit 1)

0 comments on commit 0a176b7

Please sign in to comment.