Fix baseurl. Add gh-pages deployment script.

This commit is contained in:
Maruan Al-Shedivat 2016-07-05 04:50:43 -04:00
parent 3345ee8317
commit efb2489b07
2 changed files with 36 additions and 1 deletions

View File

@ -9,7 +9,7 @@ description: > # this means to ignore newlines until "url:"
last_updated: July 5, 2016
url: # the base hostname & protocol for your site
baseurl: # the subpath of your site, e.g. /blog/
baseurl: /al-folio/ # the subpath of your site, e.g. /blog/
# Social
github_username: # put your github username

35
bin/deploy Executable file
View File

@ -0,0 +1,35 @@
#!/usr/bin/env sh
# Run this script to deploy the app to Github Pages.
# Exit if any subcommand fails.
set -e
echo "Started deploying"
# Checkout gh-pages branch.
if [ `git branch | grep gh-pages` ]
then
git branch -D gh-pages
fi
git checkout -b gh-pages
# Build site.
jekyll build
# Delete and move files.
find . -maxdepth 1 ! -name '_site' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \;
mv _site/* .
rm -R _site/
# Push to gh-pages.
git add -fA
git commit --allow-empty -m "$(git log -1 --pretty=%B) [ci skip]"
git push -f -q origin gh-pages
# Move back to previous branch.
git checkout -
echo "Deployed Successfully!"
exit 0