Fix baseurl. Add gh-pages deployment script.
This commit is contained in:
parent
3345ee8317
commit
efb2489b07
|
|
@ -9,7 +9,7 @@ description: > # this means to ignore newlines until "url:"
|
||||||
last_updated: July 5, 2016
|
last_updated: July 5, 2016
|
||||||
|
|
||||||
url: # the base hostname & protocol for your site
|
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
|
# Social
|
||||||
github_username: # put your github username
|
github_username: # put your github username
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
Loading…
Reference in New Issue