22 lines
585 B
Bash
Executable File
22 lines
585 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
|
|
|
|
set -e # Exit on error
|
|
|
|
echo "Starting deployment at $(date)"
|
|
|
|
# Pull latest changes from git
|
|
echo "Pulling latest changes from git..."
|
|
git pull
|
|
|
|
# Build the site with minification
|
|
echo "Building site with Hugo..."
|
|
hugo --minify
|
|
|
|
echo "Deployment completed successfully at $(date)"
|
|
echo "Site updated in ./public directory"
|
|
|
|
# Optional: Reload nginx if configuration changed
|
|
# echo "Reloading nginx..."
|
|
# sudo systemctl reload nginx |