-
-
Save modster/1edd5ea76700d59515bedfce50ba4fb9 to your computer and use it in GitHub Desktop.
Deploy a Static Site to Github Pages
This file contains hidden or 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
#!/bin/bash | |
GIT_REPO_URL=$(git config --get remote.origin.url) | |
mkdir .deploy | |
cp -R ./* .deploy | |
cd .deploy | |
git init . | |
git remote add github $GIT_REPO_URL | |
git checkout -b gh-pages | |
git add . | |
git commit -am "Static site deploy" | |
git push github gh-pages --force | |
cd .. | |
rm -rf .deploy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment