POST-Deploying multiple jekyll sites at once

This commit is contained in:
2018-12-05 23:00:50 -05:00
parent 3c83b9777a
commit 2233b34f85
2 changed files with 95 additions and 6 deletions

View File

@@ -11,22 +11,18 @@ if [ ! -d "{$TMP_GIT_CLONE}" ]; then
else
cd "${TMP_GIT_CLONE}"
# avoid breaking the build when force pushing
git fetch --all
git reset --hard origin/master
git pull
fi
pushd "${TMP_GIT_CLONE}"
for site in *.*/; do
[[ ! -d /var/www/${site} ]] && mkdir -p /var/www/${site} && chgrp -R /var/www/${site} && chmod g+s /var/www/${site}
[ ! -d /var/www/${site} ] && mkdir -p /var/www/${site} && chgrp -R /var/www/${site} && chmod g+s /var/www/${site}
pushd ${site}
bundle install --deployment
bundle exec jekyll build --destination /var/www/${site}
popd
done
exit
exit 0