Skip to content

Instantly share code, notes, and snippets.

@MichaelBitard
Last active November 8, 2015 21:30
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 MichaelBitard/88d922d0615bcf78b720 to your computer and use it in GitHub Desktop.
Save MichaelBitard/88d922d0615bcf78b720 to your computer and use it in GitHub Desktop.
JEKYLL = docker run -ti --rm -v "$(shell pwd):/srv/jekyll" -p 4000:4000 jekyll/jekyll:pages
RUNNER = `whoami`
COMMIT = `git rev-parse --short HEAD`
test:
@${JEKYLL} jekyll serve --watch -H 0.0.0.0 --drafts
deploy:
@echo "Building site"
@${JEKYLL} jekyll build
@git checkout master
@sudo chown -R ${RUNNER}. _site && sudo cp -r _site/* . && sudo rm -rf _*/
@git add --all . && git commit -m "Jekyll deployment from commit ${COMMIT}"
@echo "You can now push master"
@echo "Once everything is valid, git checkout develop && sudo git clean -f -d"
@python -m SimpleHTTPServer 4000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment