Files
tietokonepaja.fi/scripts/deploy.sh
Veikko Lintujärvi 7d48ec3f78 Switch to bun and add deploy script
Update engines in package.json to bun, switch all justfile recipes from npm to bun, add scripts/deploy.sh for production deployment.
2026-05-18 20:55:14 +03:00

25 lines
455 B
Bash
Executable File

#!/bin/bash
set -e
APP_NAME="tietokonepaja-fi"
APP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
DEPLOY_DIR="/var/www/tietokonepaja-fi"
echo "Deploying $APP_NAME from $APP_DIR..."
cd "$APP_DIR"
echo "Pulling latest changes..."
sudo -E git pull
echo "Installing dependencies..."
sudo bun install
echo "Building application..."
sudo bun run build
echo "Copying to $DEPLOY_DIR..."
sudo cp -r dist/. "$DEPLOY_DIR"
echo "Deployment complete."