Last active
November 8, 2015 21:30
-
-
Save MichaelBitard/88d922d0615bcf78b720 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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