Skip to content

Commit

Permalink
[UPDATE] Guard against no code change
Browse files Browse the repository at this point in the history
  • Loading branch information
hossain-khan committed Oct 12, 2024
1 parent 4cb5aeb commit 00e7be2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/dokka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ jobs:
git config --local user.name "GitHub Actions [bot]"
git config --local user.email "actions@users.noreply.github.com"
git add docs/
git commit -m "Update Dokka HTML documentation"
git push origin main
# Check if there are any changes staged
if ! git diff --cached --exit-code >/dev/null; then
git commit -m "Update Dokka HTML documentation"
git push origin main
else
echo "No changes to commit."
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 00e7be2

Please sign in to comment.