Skip to content

Commit

Permalink
Only publish if there are website changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nwmac committed Jul 24, 2020
1 parent b9bdeda commit fbd53ae
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions website/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,20 @@ cd website
echo "Adding CNAME file"
echo "stratos.app" > CNAME

echo "Adding all files"
git add -A
git commit -m "${msg}"
echo "Pushing changes ..."
git push
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to publish"
else
echo "Website has changed"
echo "Adding all files"
git add -A
git commit -m "${msg}"
echo "Pushing changes ..."
git push
fi

popd > /dev/null

echo "Removing website dist folder"
rm -rf $tmpdir

popd > /dev/null

0 comments on commit fbd53ae

Please sign in to comment.