Files
birdcam/scripts/deploy.sh

18 lines
375 B
Bash

#!/bin/bash
set -e
REPO_DIR="$(cd "$(dirname "$0")/.." && pwd)"
SERVICE_NAME="birdcam"
echo "Pulling latest code..."
cd "$REPO_DIR"
git pull origin main
echo "Installing dependencies..."
poetry install --without pi --no-dev
echo "Restarting service..."
sudo systemctl restart "$SERVICE_NAME"
sudo systemctl status "$SERVICE_NAME" --no-pager
echo "Deployed successfully."