landingpage/deploy-production.sh

34 lines
535 B
Bash
Executable File

npm run build
# create zip file of build folder
zip -r build.zip .next
# connect to server to clear folder
ssh root@93.177.67.38 << EOF
cd /home/navilearn-landingpage/
rm -rf .next/
exit
EOF
# copy zip file to server
scp build.zip root@93.177.67.38:/home/navilearn-landingpage/
# connect to server
ssh root@93.177.67.38 << EOF
cd /home/navilearn-landingpage/
unzip build.zip
rm build.zip
exit
EOF
# remove zip file from local machine
rm build.zip
echo " "
echo " "
echo "Deployment Done. Dont forget to restart the service!"