POST-Deploying multiple jekyll sites at once

This commit is contained in:
2018-12-05 15:45:55 -05:00
parent 3c83b9777a
commit b092964553
2 changed files with 2 additions and 6 deletions

View File

@@ -11,22 +11,18 @@ if [ ! -d "{$TMP_GIT_CLONE}" ]; then
else else
cd "${TMP_GIT_CLONE}" cd "${TMP_GIT_CLONE}"
# avoid breaking the build when force pushing
git fetch --all git fetch --all
git reset --hard origin/master git reset --hard origin/master
git pull git pull
fi fi
pushd "${TMP_GIT_CLONE}"
for site in *.*/; do 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} pushd ${site}
bundle install --deployment bundle install --deployment
bundle exec jekyll build --destination /var/www/${site} bundle exec jekyll build --destination /var/www/${site}
popd popd
done done
exit 0
exit