toes/scripts/deploy.sh
2026-02-09 20:52:08 -08:00

18 lines
400 B
Bash
Executable File

#!/usr/bin/env bash
set -e
# Get absolute path of this script's directory
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
ROOT_DIR="$SCRIPT_DIR/.."
# Load config
source "$ROOT_DIR/scripts/config.sh"
git push origin main
# SSH to target and update
ssh "$HOST" "cd $DEST && git pull origin main && bun run build && sudo systemctl restart toes.service"
echo "=> Deployed to $HOST"
echo "=> Visit $URL"