With the rise of cheap VPS (Virtual Private Server) services and the increase of complexity in the architecture of new web applications, deployment processes are becoming a very important topic and a skill to master to some extent.
Long gone the days when we just needed a cheap hosting service and an FTP access to be able to setup and update our static websites.
Furthermore, it is worth considering that software development has become a lot more collaborative thanks to tools like Git and services like GitHub and therefore people are getting used to the benefits of versioning. This brought in the idea of being able to keep our deploys versioned as well and to be able to roll back to a previous version easily in case a new deploy ends up to break something.
In this article we will learn how to setup a VPS (or a test virtual machine) to serve a static website with Nginx and how to create a simple yet effective deployment process to keep our website updated. Of course we will take care of integrating versioning and rollbacks in the process.
I am assuming you already have a basic knowledge of Bash, Git, SSH and Ubuntu but I will try to make things as clear as possible so that, even if you are a newbie, you should be able to understand and follow the tutorial.