initial commit
parent
bf40bc0105
commit
4e4d8dfe12
28
depoly.sh
28
depoly.sh
|
@ -1,28 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Set variables
|
|
||||||
REPO_URL="https://github.com/Cybernomad/epkys.git"
|
|
||||||
REMOTE_SERVER_IP="82.197.95.253"
|
|
||||||
|
|
||||||
source .env
|
|
||||||
|
|
||||||
# Update and push to the remote repository
|
|
||||||
git add .
|
|
||||||
git commit -m "Automated deployment"
|
|
||||||
git push origin main
|
|
||||||
|
|
||||||
ssh $SERVERUSER@$REMOTE_SERVER_IP
|
|
||||||
|
|
||||||
# Clone or pull from the remote server
|
|
||||||
if [ ! -d "$REMOTE_SERVER_IP" ]; then
|
|
||||||
git clone $REPO_URL
|
|
||||||
else
|
|
||||||
cd /home/$SERVERUSER/epkys-server
|
|
||||||
git pull origin main
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Navigate to the cloned project directory
|
|
||||||
cd /home/$USERNAME/your_project_name
|
|
||||||
|
|
||||||
# Run the development server
|
|
||||||
node server.js
|
|
Loading…
Reference in New Issue