Images and media referenced by the private Copper Chronicle section are no longer tracked by git. They live at /assets/copper-chronicle/ on the server (/srv/www/binning.net/assets/) and are managed independently. Updated all image links in src/private/copper-chronicle to use absolute paths rooted at /assets/. Added --filter='protect assets/' to all deploy rsync commands to prevent accidental deletion during deploys.
22 lines
No EOL
904 B
Bash
Executable file
22 lines
No EOL
904 B
Bash
Executable file
#!/usr/bin/env sh
|
|
|
|
set -e
|
|
|
|
printf "Deploying to PRODUCTION environment...\n"
|
|
|
|
REMOTE_HOST="crossbox"
|
|
REMOTE_USER="brimlock"
|
|
REMOTE_PATH="/srv/www/binning.net"
|
|
|
|
if ! ssh -o BatchMode=yes -o ConnectTimeout=5 ${REMOTE_USER}@${REMOTE_HOST} exit 2>/dev/null; then
|
|
printf "Warning: SSH connection test failed. Ensure SSH keys are configured.\nYou may be prompted for a password.\n"
|
|
fi
|
|
|
|
printf "Deploying website files...\n"
|
|
ssh ${REMOTE_USER}@${REMOTE_HOST} "mkdir -p /tmp/blog-deploy"
|
|
rsync -avz --delete blog/ ${REMOTE_USER}@${REMOTE_HOST}:/tmp/blog-deploy/
|
|
ssh ${REMOTE_USER}@${REMOTE_HOST} "sudo rsync -avz --delete --filter='protect assets/' /tmp/blog-deploy/ ${REMOTE_PATH}/ && \
|
|
sudo chown -R nginx:nginx ${REMOTE_PATH}/ && \
|
|
printf 'Content deployed.\n'"
|
|
|
|
printf "✓ Production deployment complete!\n\nNginx configuration is managed by the nixos-config flake (hosts/crossbox/nginx.nix).\n" |