Skip to content

Commit a002dea

Browse files
committed
Use git status to check for changes to devsite
1 parent 8a96f4f commit a002dea

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/check-docs.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
name: Doc Change Check (Run "yarn docgen:all" if this fails)
1616

17-
on: pull_request
17+
on: push
1818

1919
jobs:
2020
doc-check:
@@ -36,7 +36,11 @@ jobs:
3636
- name: Run doc generation
3737
run: yarn docgen:all
3838
- name: Check for changes in docs-devsite dir (fail if so)
39-
run: git diff --exit-code docs-devsite
39+
run: |
40+
if [[ -n "$git status docs-devsite --porcelain" ]]; then
41+
echo "Unstaged changes detected:"
42+
exit 1
43+
fi
4044
- name: Reference documentation needs to be updated. See message below.
4145
if: ${{ failure() }}
4246
run: echo "Changes in this PR affect the reference docs. Run \`yarn docgen:all\` locally to regenerate docs and add them to this PR."

0 commit comments

Comments
 (0)