aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-11-27 11:35:19 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-11-27 14:44:03 +0100
commit5b765fcab42308cd4d97a4c37da0c2b1cdb3514d (patch)
tree8d0b0eb63bf8c9bcbce7e1301365458706601149
parent38a20dd89f91c45ec8589bf1c50d50732882d38a (diff)
downloadrneovim-5b765fcab42308cd4d97a4c37da0c2b1cdb3514d.tar.gz
rneovim-5b765fcab42308cd4d97a4c37da0c2b1cdb3514d.tar.bz2
rneovim-5b765fcab42308cd4d97a4c37da0c2b1cdb3514d.zip
ci: fix api-docs workflow
`git diff-index` only works for tracked files, and unchanged documentation files counts as untracked when shallow cloning.
-rw-r--r--.github/workflows/api-docs.yml13
1 files changed, 5 insertions, 8 deletions
diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml
index 2cecd2af6d..6f8fe107d2 100644
--- a/.github/workflows/api-docs.yml
+++ b/.github/workflows/api-docs.yml
@@ -27,11 +27,8 @@ jobs:
- name: Generate docs
run: |
make doc
- printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT
-
- - name: FAIL, PR has not committed doc changes
- if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }}
- run: |
- echo "Job failed, run 'make doc' and commit your doc changes."
- echo "The doc generation produces the following changes:"
- git diff --color --exit-code
+ if [ -n "$(git status --porcelain)" ]; then
+ echo "::error::Job failed, run 'make doc' and commit your doc changes."
+ echo "::error::The doc generation produces the following changes:"
+ git diff --color --exit-code
+ fi