diff options
Diffstat (limited to '.github/workflows/api-docs.yml')
-rw-r--r-- | .github/workflows/api-docs.yml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 39d85e967d..36ac087c4a 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -1,3 +1,6 @@ +# Autogenerate the API docs on new commit to important branches +# Also work as a check for PR's to not forget commiting their doc changes +# called from api-docs-check.yml name: Autogenerate API docs on: push: @@ -9,6 +12,12 @@ on: - 'master' - 'release-[0-9]+.[0-9]+' workflow_dispatch: + workflow_call: + inputs: + check_only: + type: boolean + default: false + required: false jobs: regen-api-docs: @@ -44,6 +53,12 @@ jobs: python3 scripts/gen_vimdoc.py printf '::set-output name=UPDATED_DOCS::%s\n' $([ -z "$(git diff)" ]; echo $?) + - name: FAIL, PR has not commited doc changes + if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 && inputs.check_only }} + run: | + echo "Job failed, run ./scripts/gen_vimdoc.py and commit your doc changes" + exit 1 + - name: Automatic PR if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }} run: | |