A command-line tool that collapses a multi-step deploy workflow into a single command. Born out of frustration with forgetting a step mid-deploy.

The workflow it replaces

Before: build locally → rsync to VPS → SSH in → reload Nginx → check logs. Five steps, easy to miss one under pressure.

After: ./deploy.sh — done in under 10 seconds.

How it works

#!/usr/bin/env bash
set -euo pipefail

source .env  # REMOTE_USER, REMOTE_HOST, REMOTE_PATH

echo "[1/3] Building..."
npm run build

echo "[2/3] Syncing..."
rsync -az --delete ./dist/ "$REMOTE_USER@$REMOTE_HOST:$REMOTE_PATH"

echo "[3/3] Reloading Nginx..."
ssh "$REMOTE_USER@$REMOTE_HOST" "sudo systemctl reload nginx"

set -euo pipefail is the key detail — any failed step aborts the whole script instead of silently continuing. No silent failures.

The Python companion script (check.py) runs post-deploy: pings the URL, checks the response code, and sends a desktop notification on success or failure.

Lessons

Simple tooling beats complex tooling every time. This is 60 lines of shell and 30 lines of Python. It does exactly one thing and does it reliably.