skip commit and push if nothing to commit
@@ -95,6 +95,7 @@ def push_documents_to_gh_pages(*, src_dir: pathlib.Path, dst_branch: str = 'gh-p
author = '{} <online-judge-verify-helper@example.com>'.format(username)
message = '[auto-verifier] docs commit {}'.format(os.environ['GITHUB_SHA'])
subprocess.check_call(['git', 'add', '.'])
+ if subprocess.run(['git', 'diff', '--quiet', '--staged']).returncode:
subprocess.check_call(['git', 'commit', '--author', author, '-m', message])
subprocess.check_call(['git', 'push', url, 'HEAD'])
