#!/usr/bin/env bash # ----------------------------------------------------------------------------- # Novarix Networks website — deploy script # ----------------------------------------------------------------------------- # Run this on the Ubuntu Nginx VM after pushing changes to Gitea: # # cd /var/www/novarix.uk # ./deploy.sh # # It pulls the latest code, rebuilds the static site into out/, and reloads # Nginx. Run once with `chmod +x deploy.sh` if it isn't executable yet. # ----------------------------------------------------------------------------- set -euo pipefail echo "==> Pulling latest from Gitea" git pull origin main echo "==> Installing dependencies" npm install --no-audit --no-fund echo "==> Building static site into out/" npm run build echo "==> Testing Nginx config" sudo nginx -t echo "==> Reloading Nginx" sudo systemctl reload nginx echo "==> Done. Site updated at $(date -Iseconds)"