Files
Kismet Hasanaj 8b8b536237 .
2026-05-03 00:48:28 +02:00

31 lines
930 B
Bash
Executable File

#!/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)"