Skip to content

Commit

Permalink
Fix documentation workflow always trying to commit
Browse files Browse the repository at this point in the history
Don't try to commit and push if there is nothing to commit, because git will exit with 1, failing the workflow.
A continuation of ca6b87d.
  • Loading branch information
penev92 committed Dec 13, 2023
1 parent 59473bd commit 02d31a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
cd wiki
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git status
git diff-index --quiet HEAD || \
(
git add --all && \
Expand Down Expand Up @@ -140,6 +141,7 @@ jobs:
cd docs
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git status
git diff-index --quiet HEAD || \
(
git add api/*.md && \
Expand Down

0 comments on commit 02d31a2

Please sign in to comment.