Created
February 21, 2019 16:29
-
-
Save beckler/057b956b9dc80150f9153ee2230260b0 to your computer and use it in GitHub Desktop.
Easy hugo deploy to github pages
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/bash | |
echo -e "\033[0;32mDeploying updates to GitHub...\033[0m" | |
# build the project -> outputs to public folder | |
hugo --minify --buildFuture | |
# commit the public folder | |
git add public && git commit -m "Update content" | |
# push the public folder ONLY to the gh-pages branch | |
git subtree push --prefix public origin gh-pages | |
echo -e "\033[0;32mFinished deploying.\033[0m" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment