mirror of
https://github.com/Floriansylvain/compact-portfolio.git
synced 2026-08-19 19:53:24 +02:00
24 lines
585 B
Bash
24 lines
585 B
Bash
#!/bin/bash
|
|
|
|
# Pull latest changes from git repository
|
|
echo "Pulling latest changes..."
|
|
git pull
|
|
|
|
# Check if git pull was successful
|
|
if [ $? -eq 0 ]; then
|
|
echo "Git pull successful. Restarting compact-portfolio service..."
|
|
sudo systemctl restart compact-portfolio.service
|
|
|
|
# Check if service restart was successful
|
|
if [ $? -eq 0 ]; then
|
|
echo "Service restarted successfully."
|
|
else
|
|
echo "Failed to restart service."
|
|
exit 1
|
|
fi
|
|
else
|
|
echo "Git pull failed. Service not restarted."
|
|
exit 1
|
|
fi
|
|
|
|
echo "Deployment completed successfully!" |