chore: improve deploy-docs script

This commit is contained in:
Trancever
2019-09-12 15:18:35 +02:00
parent dc04d94eba
commit 9c8a916596

View File

@@ -48,15 +48,16 @@ cd dist
git config user.name "$COMMIT_AUTHOR_NAME"
git config user.email "$COMMIT_AUTHOR_EMAIL"
git add -A .
# If there are no changes to the compiled dist (e.g. this is a README update) then just bail.
if git diff --quiet; then
if git diff --cached --quiet; then
echo "No changes to the output on this push; exiting."
exit 0
fi
# Commit the "changes", i.e. the new version.
# The delta will show diffs between new and old versions.
git add -A .
git commit -m "Deploy to GitHub Pages: ${SHA}"
# Now that we're all set up, we can push.