mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
ci: fix api-docs workflow
`git diff-index` only works for tracked files, and unchanged documentation files counts as untracked when shallow cloning.
This commit is contained in:
parent
38a20dd89f
commit
5b765fcab4
13
.github/workflows/api-docs.yml
vendored
13
.github/workflows/api-docs.yml
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user