I'm using Windows with XAMPP when developing web applications (with Laravel). Also, I use Git for version control. When I finish a project, I'll have to deploy it on VPS (LAMP). How to do it? For now, two ideas come to my mind:
SFTP - For example, I would use MobaXterm's Graphical SFTP browser, I would just copy my project (files)... and then I would import MySQL database (or run migrations).
Git/GitHub - on my VPS I would install Git and then I would:
- create a remote repository on GitHub (should it be private?)
- git push (from localhost to GitHub)
- and then, on VPS, I would do git clone (from GitHub to VPS)
- finally, I just need to import MySQL database (or run migrations).
Do you work in this way, or there is a better solution? I suppose that the second way (Git/GitHub) is better than the first (SFTP) because if I have to add some new features or fix bugs - all I will have to do on the server is: git pull (from GitHub).
EDIT:
Now I see that there are services such as envoyer.io and forge, but they are not free. So, what are the disadvantages of the second way (2. Git/GitHub ) that I described in my question, which is free?