Compare commits

...

5 Commits

Author SHA1 Message Date
bbec36da82 Remove subtree atom-build script 2020-03-13 10:02:58 -04:00
d9455c2733 Initial build-wrapper atom-build support 2020-03-13 10:02:25 -04:00
51c4f3a3f4 Add comment and update google analytics id 2020-03-13 10:01:53 -04:00
e3b173d75f Fix link in post 2020-03-13 10:00:40 -04:00
03b1610cfd Update post-receive hook script 2020-03-13 10:00:21 -04:00
5 changed files with 32 additions and 18 deletions

View File

@@ -1,2 +1,13 @@
cmd: '{FILE_ACTIVE} {FILE_ACTIVE_PATH}'
name: 'Run build.sh'
cmd: 'build-wrapper podman-run-wrapper --debug -m ephemeral -o "-it -p 4000:4000 -v /home/bryan/Documents/develop/www/blog.bryanroessler.com:/srv/jekyll -v /home/bryan/Documents/develop/www/blog.bryanroessler.com/vendor/bundle:/usr/local/bundle" -i jekyll/jekyll -n "jekyll-blog" "bundle exec jekyll serve --watch --drafts"'
name: 'blog.bryanroessler.com--SERVE'
targets:
blog.bryanroessler.com--BUNDLE-UPDATE:
cmd: 'build-wrapper podman-run-wrapper --debug -m ephemeral -o "-it -p 4000:4000 -v /home/bryan/Documents/develop/www/blog.bryanroessler.com:/srv/jekyll -v /home/bryan/Documents/develop/www/blog.bryanroessler.com/vendor/bundle:/usr/local/bundle" -i jekyll/jekyll -n "jekyll-blog" --selinuxfix "chmod a+w /srv/jekyll/Gemfile.lock && bundle update --all"'
landing.bryanroessler.com--SERVE:
cmd: 'build-wrapper podman-run-wrapper --debug -m ephemeral -o "-it -p 4000:4000 -v /home/bryan/Documents/develop/www/landing.bryanroessler.com:/srv/jekyll -v /home/bryan/Documents/develop/www/landing.bryanroessler.com/vendor/bundle:/usr/local/bundle" -i jekyll/jekyll -n "jekyll-landing" "bundle exec jekyll serve --watch --drafts"'
landing.bryanroessler.com--BUNDLE-UPDATE:
cmd: 'build-wrapper podman-run-wrapper --debug -m ephemeral -o "-it -p 4000:4000 -v /home/bryan/Documents/develop/www/landing.bryanroessler.com:/srv/jekyll -v /home/bryan/Documents/develop/www/landing.bryanroessler.com/vendor/bundle:/usr/local/bundle" -i jekyll/jekyll -n "jekyll-landing" --selinuxfix "chmod a+w /srv/jekyll/Gemfile.lock && bundle update --all"'
cv.bryanroessler.com--SERVE:
cmd: 'build-wrapper podman-run-wrapper --debug -m ephemeral -o "-it -p 4000:4000 -v /home/bryan/Documents/develop/www/cv.bryanroessler.com:/srv/jekyll -v /home/bryan/Documents/develop/www/cv.bryanroessler.com/vendor/bundle:/usr/local/bundle" -i jekyll/jekyll -n "jekyll-cv" "bundle exec jekyll serve --watch --drafts"'
cv.bryanroessler.com--BUNDLE-UPDATE:
cmd: 'build-wrapper podman-run-wrapper --debug -m ephemeral -o "-it -p 4000:4000 -v /home/bryan/Documents/develop/www/cv.bryanroessler.com:/srv/jekyll -v /home/bryan/Documents/develop/www/cv.bryanroessler.com/vendor/bundle:/usr/local/bundle" -i jekyll/jekyll -n "jekyll-cv" --selinuxfix "chmod a+w /srv/jekyll/Gemfile.lock && bundle update --all"'

View File

@@ -1,2 +0,0 @@
cmd: '{FILE_ACTIVE} {FILE_ACTIVE_PATH}'
name: 'Run build.sh'

View File

@@ -105,7 +105,7 @@ url-pretty: "bryanroessler.com" # eg. "deanattali.com/beautiful-jekyll"
# --- Web Statistics Section --- #
# Fill in your Google Analytics ID to track your website using GA
#google_analytics: ""
google_analytics: "UA-158358388-1"
# Google Tag Manager ID
#gtm: ""
@@ -200,6 +200,9 @@ exclude:
- README.md
- Vagrantfile
#https://github.com/jekyll/jekyll/issues/5267#issuecomment-241379902
exclude: [vendor]
# prose.io config
prose:
rooturl: '_posts'
@@ -256,7 +259,5 @@ plugins:
- jekyll-paginate
- jekyll-sitemap
exclude: [vendor]
# Beautiful Jekyll / Dean Attali
# 2fc73a3a967e97599c9763d05e564189

View File

@@ -8,7 +8,7 @@ tags: [jekyll, git]
As advertised, Jekyll is an excellent choice for building a simple (and secure!) personal or small business website. However, when compared to its better-known and bigger brethren, scaling the Jekyll workflow to manage multiple sites or subdomains is not readily apparent. In this post I will outline a git-based workflow to build and deploy a website with multiple subdomains.
I prefer storing my work in version controlled git repositories in order to keep track of modifications and to assist in the backup and restore of my environment and data on multiple machines. One of the machines that I use to store this data [is also the cloud storage VPS that I use to run this site.]({{ {% post_url 2018-06-22-strategies-for-maximizing-vps %} | relative_url }}) The storage VPS holds the [bare website repositories](https://git.bryanroessler.com/bryan/www) that I can push to and pull from my other development machines. Since my website repositories contain jekyll site code, all that I need to do is to instruct the VPS to build and deploy that code!
I prefer storing my work in version controlled git repositories in order to keep track of modifications and to assist in the backup and restore of my environment and data on multiple machines. One of the machines that I use to store this data [is also the cloud storage VPS that I use to run this site.]({% post_url 2018-06-22-strategies-for-maximizing-vps %}) The storage VPS holds the [bare website repositories](https://git.bryanroessler.com/bryan/www) that I can push to and pull from my other development machines. Since my website repositories contain jekyll site code, all that I need to do is to instruct the VPS to build and deploy that code!
There are three steps that need to occur for this to happen seamlessly after the git repos have been created (which is outside the scope of this post).

View File

@@ -4,11 +4,11 @@
GIT_DIR="$(pwd)"
TMP_GIT_DIR="/tmp/${GIT_DIR##*/}"
if [ ! -d "${TMP_GIT_DIR}" ]; then
if [[ ! -d "${TMP_GIT_DIR}" ]]; then
git clone "${GIT_DIR}" "${TMP_GIT_DIR}"
cd "${TMP_GIT_DIR}"
cd "${TMP_GIT_DIR}" || exit $?
else
cd "${TMP_GIT_DIR}"
cd "${TMP_GIT_DIR}" || exit $?
unset GIT_DIR
git fetch --all
git reset --hard origin/master
@@ -16,12 +16,16 @@ else
fi
for site in *.*/; do
[ ! -d /var/www/${site} ] && mkdir -p /var/www/${site} && chgrp -R /var/www/${site} && chmod g+s /var/www/${site}
pushd ${site}
deploy_dir="/var/www/${site}"
if [[ ! -d "$deploy_dir" ]]; then
mkdir -p "$deploy_dir"
chgrp -R "$deploy_dir"
chmod g+s "$deploy_dir"
fi
pushd "${site}" || exit $?
bundle install --deployment
bundle exec jekyll build --destination /var/www/${site}
popd
bundle exec jekyll build --destination "$deploy_dir"
popd || exit $?
done
exit
exit 0