Skip to content

Commit efb2489

Browse files
committed
Fix baseurl. Add gh-pages deployment script.
1 parent 3345ee8 commit efb2489

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

_config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: > # this means to ignore newlines until "url:"
99
last_updated: July 5, 2016
1010

1111
url: # the base hostname & protocol for your site
12-
baseurl: # the subpath of your site, e.g. /blog/
12+
baseurl: /al-folio/ # the subpath of your site, e.g. /blog/
1313

1414
# Social
1515
github_username: # put your github username

bin/deploy

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env sh
2+
3+
# Run this script to deploy the app to Github Pages.
4+
5+
# Exit if any subcommand fails.
6+
set -e
7+
8+
echo "Started deploying"
9+
10+
# Checkout gh-pages branch.
11+
if [ `git branch | grep gh-pages` ]
12+
then
13+
git branch -D gh-pages
14+
fi
15+
git checkout -b gh-pages
16+
17+
# Build site.
18+
jekyll build
19+
20+
# Delete and move files.
21+
find . -maxdepth 1 ! -name '_site' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \;
22+
mv _site/* .
23+
rm -R _site/
24+
25+
# Push to gh-pages.
26+
git add -fA
27+
git commit --allow-empty -m "$(git log -1 --pretty=%B) [ci skip]"
28+
git push -f -q origin gh-pages
29+
30+
# Move back to previous branch.
31+
git checkout -
32+
33+
echo "Deployed Successfully!"
34+
35+
exit 0

0 commit comments

Comments
 (0)