Automation · 8 min read · Intermediate
Fast Static & API Deploys with rsync
Ship frontend updates in 2 seconds with delta transfers and verify live HTTP health right after deploy.
What you'll learn
- Use `rsync -az --delete` to upload only changed files and purge stale assets
- Keep API restarts fast and verify `systemctl is-active`
- Tag release commits so rollbacks take seconds
Overview
Ship frontend updates in 2 seconds with delta transfers and verify live HTTP health right after deploy.
Code Example
npm run build
rsync -az --delete dist/ root@159.65.135.59:/var/www/devpath/
curl -sSf -o /dev/null https://devpath.jpsoriano.dev/api/health && echo "Deploy OK"
Key Takeaways
- Use
rsync -az --deleteto upload only changed files and purge stale assets - Keep API restarts fast and verify
systemctl is-active - Tag release commits so rollbacks take seconds
Quick Check
Check Your Understanding
Score: 0 / 1
1. What does the `--delete` flag in `rsync -az --delete dist/ server:/var/www/app/` do?
Study Workspace
Finished this lesson?
Your progress is saved locally in your browser, no account needed.