From 9c8a916596e37abc920d3f32e30e38672d0e140b Mon Sep 17 00:00:00 2001 From: Trancever Date: Thu, 12 Sep 2019 15:18:35 +0200 Subject: [PATCH] chore: improve deploy-docs script --- .circleci/deploy-docs.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/deploy-docs.sh b/.circleci/deploy-docs.sh index 1d76bad..b06a3b8 100755 --- a/.circleci/deploy-docs.sh +++ b/.circleci/deploy-docs.sh @@ -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.