Have you ever stopped to think about the risk of having a pipeline where any merge into the main branch deploys straight to production without a single safety gate?

For a long time, our workflow here was that classic setup almost every developer has used at some point: merge on main triggering an SSH script with git pull and pm2 restart

It worked for day-to-day tasks, but it gave a false sense of stability lol

The reality check hit when I found a critical blind spot in the automation: remote SSH scripts were running without strict error handling. In other words, if a git pull caused a conflict or a database migration failed halfway through, the script simply ignored the failure, ran to the end, and GitHub Actions marked the pipeline as green

The absolute worst-case scenario for monitoring: the pipeline reported that everything went smoothly, while production was already completely down