How I Built a CI/CD Pipeline That Deploys to VPS Automatically 🚀

Words
187
Reading
1 min
Listen
Play
6M

As a DevOps Engineer, one of the most satisfying moments is pushing code and watching it automatically deploy to production without touching the server manually.

Here's how I set up a CI/CD pipeline using GitHub Actions that deploys directly to a Hostinger VPS — something I use in real production projects today.

🔧 The Stack

  • GitHub Actions — for the pipeline

  • Docker — to containerize the app

  • Nginx — as reverse proxy

  • Hostinger VPS — the deployment server

  • SSH — secure deployment trigger

⚙️ How It Works

  1. Developer pushes code to main branch

  2. GitHub Actions triggers automatically

  3. Pipeline builds the Docker image

  4. SSH into VPS and pulls the latest image

  5. Container restarts with zero downtime

  6. Nginx serves the updated app instantly ✅

💡 What I Learned

Before this, every deployment meant manually SSHing into the server, pulling code, restarting services — every single time.

Now it's fully automated. One push = live deployment. This saves hours every week and reduces human error drastically.

Automation isn't just about saving time — it's about building confidence in your deployments. 🙌

#DevOps #CICD #GitHubActions #Docker #Linux #VPS #Automation #TechLife #Hive

How I Built a CI/CD Pipeline That Deploys to VPS Automatically 🚀 | Ecency