Skip to content

Commit

Permalink
github: Commit Sphinx documentation on changes only
Browse files Browse the repository at this point in the history
Previously, `git commit ...` failed while trying to commit no changes.
To prevent this, check changes first.
  • Loading branch information
Roman Inflianskas committed Feb 2, 2024
1 parent bcfefbd commit fe0f281
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ jobs:
git add -A
git config --global user.email "$(git show --format=%ae -s)"
git config --global user.name "$(git show --format=%an -s)"
git commit -m "From $GITHUB_REF $(echo ${GITHUB_SHA} | cut -c 1-8)"
git diff-index --quiet HEAD || git commit -m "From $GITHUB_REF $(echo ${GITHUB_SHA} | cut -c 1-8)"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git push

0 comments on commit fe0f281

Please sign in to comment.