Deploy Automation
This is a member-only chapter. Log in with your Signal Over Noise membership email to continue.
Log in to readModule 6 · Section 5 of 7
Deploy Automation
The deploy workflow for VPS-hosted sites is always the same three steps:
- Build
- Rsync to server
- Optionally verify
Automating it:
#!/usr/bin/env bash
set -e
REMOTE_HOST="my-vps"
REMOTE_PATH="/var/www/my-site"
echo "Building..."
npm run build
echo "Deploying to ${REMOTE_HOST}..."
rsync -avz --delete dist/ "${REMOTE_HOST}:${REMOTE_PATH}/"
echo "Done. Checking live site..."
curl -s -o /dev/null -w "%{http_code}" https://my-domain.com
For Cloudflare Pages, deploy automation is git push. The CI/CD is built in — every push to the main branch triggers a build and deploy.