Automated deployment
parent
d7116d36ec
commit
bf40bc0105
10
depoly.sh
10
depoly.sh
|
@ -3,19 +3,21 @@
|
||||||
# Set variables
|
# Set variables
|
||||||
REPO_URL="https://github.com/Cybernomad/epkys.git"
|
REPO_URL="https://github.com/Cybernomad/epkys.git"
|
||||||
REMOTE_SERVER_IP="82.197.95.253"
|
REMOTE_SERVER_IP="82.197.95.253"
|
||||||
USERNAME="jeremy"
|
|
||||||
PASSWORD="Chickenkil13r!"
|
source .env
|
||||||
|
|
||||||
# Update and push to the remote repository
|
# Update and push to the remote repository
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Automated deployment"
|
git commit -m "Automated deployment"
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|
||||||
|
ssh $SERVERUSER@$REMOTE_SERVER_IP
|
||||||
|
|
||||||
# Clone or pull from the remote server
|
# Clone or pull from the remote server
|
||||||
if [ ! -d "$REMOTE_SERVER_IP" ]; then
|
if [ ! -d "$REMOTE_SERVER_IP" ]; then
|
||||||
git clone $REPO_URL
|
git clone $REPO_URL
|
||||||
else
|
else
|
||||||
cd /home/$USERNAME/
|
cd /home/$SERVERUSER/epkys-server
|
||||||
git pull origin main
|
git pull origin main
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -23,4 +25,4 @@ fi
|
||||||
cd /home/$USERNAME/your_project_name
|
cd /home/$USERNAME/your_project_name
|
||||||
|
|
||||||
# Run the development server
|
# Run the development server
|
||||||
npm run dev
|
node server.js
|
Loading…
Reference in New Issue