#!/bin/bash # Plesk Post-Deploy Script # Configure in: Plesk → Domain → Git → Post-deploy actions # # This runs after Plesk pulls the latest code from the main branch. set -e export NODE_ENV=production export PATH=/opt/plesk/node/22/bin:$PATH echo "[deploy] Installing dependencies..." pnpm install --frozen-lockfile 2>/dev/null || npm ci echo "[deploy] Building..." pnpm build 2>/dev/null || npm run build echo "[deploy] Restarting application..." touch tmp/restart.txt echo "[deploy] Done!"