Skip to content

Instantly share code, notes, and snippets.

@say4n
Created May 9, 2017 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save say4n/7f3d0842bea7127a8f75956edb4b6630 to your computer and use it in GitHub Desktop.
Save say4n/7f3d0842bea7127a8f75956edb4b6630 to your computer and use it in GitHub Desktop.
Build jekyll website, copy to production folder, spin up http server.
# variables
src="./build/"
dst=".."
# jekyll build
echo "Runnning jekyll build"
jekyll build --destination $src
# copy to root
echo "Moving files from $src to $dst"
rsync -r $src $dst
# delete built files
echo "Deleting $src"
rm -r $src
# KThxBye
echo "Starting http server @ http://localhost:8000\nCtrl+C to exit ..."
cd ..
python3 -m http.server
echo "Done !"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment