#!/bin/bash
set -e

cd /opt/dumpsterChat

# Load nvm for Node/npm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm use 22

git pull
make build
systemctl restart dumpster

echo "Deploy complete — $(date)"
