Only commit if there are files to commit

This commit is contained in:
Syrus 2020-01-15 12:43:58 +01:00
parent 84beb446d9
commit 991a777f72

View File

@ -314,7 +314,7 @@ docs-publish:
git clone -b "gh-pages" --depth=1 https://wasmerbot:$(GITHUB_DOCS_TOKEN)@github.com/wasmerio/wasmer.git api-docs-repo
cp -R api-docs/* api-docs-repo/
cd api-docs-repo && git add index.html rust/* c/*
cd api-docs-repo && git commit -m "Publishing GitHub Pages ***CI***"
cd api-docs-repo && (git diff-index --quiet HEAD || git commit -m "Publishing GitHub Pages")
cd api-docs-repo && git push origin gh-pages
wapm: