Created
May 15, 2015 12:38
-
-
Save krizko/d035d34e43aebb2f593b to your computer and use it in GitHub Desktop.
post-recieve git hook - automatic MD convert to HTML via mdown
This file contains 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
#!/bin/sh | |
echo "Fetching MDs and parsing them" | |
# Go to dest folder | |
GIT_WORK_TREE=DEST_FOLDER | |
cd DEST_FOLDER | |
# Pull & checkout from git | |
git pull | |
git checkout -f | |
# mdown - convert md files to html | |
mdown --input "DEST_FOLDER/*.md" --output DEST_FOLDER/md-web | |
echo "Finished" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment