Skip to content

Instantly share code, notes, and snippets.

@aclima93
Created July 27, 2020 11:32
Show Gist options
  • Save aclima93/f7386b707cb15560279abe55b151f5ea to your computer and use it in GitHub Desktop.
Save aclima93/f7386b707cb15560279abe55b151f5ea to your computer and use it in GitHub Desktop.
#!/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