Created
July 27, 2020 11:32
-
-
Save aclima93/f7386b707cb15560279abe55b151f5ea to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
# default values | |
SRC=${1:-_site/} | |
DST=${2:-docs/} | |
USER_PAGE=${3:-../aclima93.github.io/} | |
BLOG_PAGE=${3:-../Blog/docs/} | |
# copy the contents from $SRC (_site/) to $DST (doc/) and serve that over at github-pages | |
rm -rf $DST; | |
cp -r $SRC $DST; | |
git add $DST; | |
git commit -m "published site"; | |
git push; | |
# copy static site files from code repository to user page repository | |
cp -r $BLOG_PAGE $USER_PAGE; | |
cd $USER_PAGE; | |
git add . | |
git commit -m "published site"; | |
git push; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment