Skip to content

Commit

Permalink
ci: only commit and push API docs if there are changes
Browse files Browse the repository at this point in the history
  • Loading branch information
evenh committed Nov 4, 2024
1 parent fdfc318 commit 8010f87
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/api-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,11 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "GithubActions"
git add .
git commit -m "Update Skiperator api-docs"
git push origin main
# Only commit if there are changes
git diff --cached --exit-code
if [ $? -eq 0 ]; then
echo "No changes to commit"
else
git commit -m "Update Skiperator api-docs"
git push origin main
fi

0 comments on commit 8010f87

Please sign in to comment.