Last active
January 15, 2022 11:43
-
-
Save ahampriyanshu/86e0a1e1fcfc3f3ec0849a2840551869 to your computer and use it in GitHub Desktop.
Bash script to push changes in a MERN app
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/sh | |
cd ~/app-name/client | |
git add . | |
git commit -m "$1" | |
git push | |
rm -rf build | |
npm run build | |
rm -rf ../server/public | |
mv build ../server/public | |
cd ../server | |
git add . | |
git commit -m "$1" | |
git push | |
ssh server_ip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment