Files
blog/deploy.sh
2026-02-12 15:36:05 -05:00

23 lines
725 B
Bash
Executable File

#!/bin/bash
# Deployment script for Hugo site on LXC container
# Run this script after SSH-ing into the container and navigating to the site directory
# This script updates the site and restarts the Hugo server systemd service
set -e # Exit on error
echo "Starting deployment at $(date)"
# Pull latest changes from git
echo "Pulling latest changes from git..."
git pull
# Update theme submodule (required for hello-friend-ng theme)
echo "Updating theme submodule..."
git submodule update --init --recursive
# Restart Hugo server to pick up changes
echo "Restarting Hugo server..."
sudo systemctl restart hugo-dustin
echo "Deployment completed successfully at $(date)"
echo "Hugo server restarted and changes are live."