Created
April 27, 2020 10:07
-
-
Save simonthor/bc9ffa0e8584854c13ca8094bf78fbbe to your computer and use it in GitHub Desktop.
Shell script used for building and deploying my personal website (github.com/simonthor/simonthor.github.io)
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
#!/usr/bin/env bash | |
# Compile into React app | |
cd dev | |
npm run build | |
# Copy compiled code to master branch of git but keep README | |
cd .. | |
mv ./build/README.md . | |
rm -r ./build/* | |
cp -rp ./dev/build/* ./build/ | |
mv README.md ./build/ | |
# push new version of compiled website to remote repo | |
cd build | |
git add . | |
git commit -m "$1" | |
git push | |
echo "Finished" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment