Skip to content

Commit

Permalink
fix python docs action: commit and push only if changes exist (#759)
Browse files Browse the repository at this point in the history
  • Loading branch information
danking authored Sep 6, 2024
1 parent 8b8926b commit 35b24ac
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/python-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
git add docs
git config --global user.email "[email protected]"
git config --global user.name "github-action-deploy-python-docs"
git commit -m 'Python docs for '$this_sha
git push origin HEAD:gh-pages-bench
# Only try to commit if there exist changes
git diff --quiet HEAD || {
git commit -m 'Python docs for '$this_sha
git push origin HEAD:gh-pages-bench
}
git checkout 'HEAD@{2}'

0 comments on commit 35b24ac

Please sign in to comment.