mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Only commit if there's something to do
This commit is contained in:
parent
d96b8cedc5
commit
38b03e2b18
@ -57,8 +57,12 @@ def deploy_documentation(token):
|
|||||||
shutil.copyfile(os.path.join(root, name), os.path.join(target, name))
|
shutil.copyfile(os.path.join(root, name), os.path.join(target, name))
|
||||||
|
|
||||||
sp.check_call(["git", "add", "--all", "."])
|
sp.check_call(["git", "add", "--all", "."])
|
||||||
sp.check_call(["git", "commit", "-m", "Automatic gh-pages deployment"])
|
|
||||||
sp.check_call(["git", "push", "origin", "gh-pages"], stdout=devnull, stderr=devnull)
|
filenum = sp.check_output(["git", "status", "--porcelain"])
|
||||||
|
filenum = len(str(filenum, "utf-8").split("\n")) - 1
|
||||||
|
if filenum > 0:
|
||||||
|
sp.check_call(["git", "commit", "-m", "Automatic gh-pages deployment"])
|
||||||
|
sp.check_call(["git", "push", "origin", "gh-pages"], stdout=devnull, stderr=devnull)
|
||||||
|
|
||||||
os.chdir("..")
|
os.chdir("..")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user