26 lines
544 B
Bash
26 lines
544 B
Bash
#!/bin/bash
|
|
|
|
# Set variables
|
|
REPO_URL="https://github.com/Cybernomad/epkys.git"
|
|
REMOTE_SERVER_IP="82.197.95.253"
|
|
USERNAME="jeremy"
|
|
PASSWORD="Chickenkil13r!"
|
|
|
|
# Update and push to the remote repository
|
|
git add .
|
|
git commit -m "Automated deployment"
|
|
git push origin main
|
|
|
|
# Clone or pull from the remote server
|
|
if [ ! -d "$REMOTE_SERVER_IP" ]; then
|
|
git clone $REPO_URL
|
|
else
|
|
cd /home/$USERNAME/
|
|
git pull origin main
|
|
fi
|
|
|
|
# Navigate to the cloned project directory
|
|
cd /home/$USERNAME/your_project_name
|
|
|
|
# Run the development server
|
|
npm run dev |