Deploying Code Gone Wrong: A DevOps Lesson Learned

I broke my own server… just by deploying code 😅 That’s when I realized — I don’t actually understand deployment. Before this, my “CI/CD pipeline” was: ssh → git pull → npm install → pm2 restart …and pray nothing breaks 🙏 Works fine… until it doesn’t. One wrong env, one missed step, one failed install — and production is down. So I decided to fix this properly. Started from basics: 📦 Used "scp" to push builds manually 🔑 Used "ssh" to run commands on VPS ⚙️ Wrote small bash scripts to automate steps Felt powerful… but still risky. Because I was the pipeline. Then I moved to GitHub Actions. Now every push to main: • builds the project • securely connects to VPS • deploys code • restarts services No manual login. No “did I run that command?” No panic. But here’s what actually changed my thinking: «CI/CD is not about saving time. It’s about removing human mistakes from production.» Also learned the hard way: • Always test scripts on staging first • Make deployments idempotent • Never trust ".env" blindly • Logs > assumptions Now deployment feels less like a risk… and more like a system. Still learning DevOps. But at least now — pushing code doesn’t feel like gambling 🎯 What’s the worst thing you’ve broken while deploying? 😄 #CICD #DevOps #GitHubActions #VPS #BackendEngineering #Automation #DeveloperLife

  • graphical user interface

To view or add a comment, sign in

Explore content categories