Created
January 21, 2016 07:33
-
-
Save tzmartin/4cda11d5ae0bd7eda1e7 to your computer and use it in GitHub Desktop.
Create Github Pages from bash
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
echo "Enter your Github email" | |
read githubid | |
echo "Resume RepoName you wish to give? Your resume will be accessible from http://"$github".github.io/RepoName" | |
read reponame | |
echo curl -u $githubid https://api.github.com/user/repos -d \'{\"name\":\"$reponame\"}\' | bash - | |
echo "Enter the complete path of your resume file" | |
read resumepath | |
cp $resumepath . | |
git init | |
git checkout -b gh-pages | |
git add . | |
git commit -m 'initial commit' | |
remoteurl="https://github.com/"${githubid%@*}"/"$reponame | |
git remote add origin $remoteurl | |
git push origin gh-pages | |
test=$(python -c "print '$resumepath'.split('/')[-1]") | |
url="http://"${githubid%@*}".github.io/"$reponame"/"$test | |
echo "Finished, opening resume URl, refresh webpage if you get 404" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment