blog/deploy.sh
Matthew Binning 19cdf9cd88 feat!: Split site into public and private sections
Moved the Copper Chronicle and resume into a private git submodule
(src/private), visible only to authenticated users. Added a lock symbol
to the mdbook sidebar for restricted sections. Reorganized nginx/nix
configuration files into a dedicated folder. Removed one-line descriptions
from the menu. Reduced custom CSS to better align the main website's theme
with mdbook's native styling. Personalized the index and blog introduction
pages.
2026-04-04 13:32:09 -07:00

22 lines
No EOL
877 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 /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"