Skip to content

Commit 875f0ac

Browse files
committed
Try not to fail on grep returning no items
1 parent ed67701 commit 875f0ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/publish-github-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
id: change-check
4141
run: |
4242
cd $GITHUB_WORKSPACE/main
43-
X=`git diff HEAD~1 --name-only | grep "^documentation" | wc -l`
43+
X=`git diff HEAD~1 --name-only | { grep "^documentation" || test $? = 1; } | wc -l`
4444
if [ $X == "0" ]; then
4545
echo 'No changes to the documenation'
4646
else

0 commit comments

Comments
 (0)