I still can not figure out what the best deploy of a site is. I explain the way I'm doing:
GIT
- I started a local repository
- I hosted my repository on some service like GitHub / Bitbucket
- I joined the server via SSH and clone the direct repository of this service
- Whenever I update the site on my local PC, I give a PUSH back to GitHub / BitBucket, I enter the site via SSH and I give a PULL to update the files.
This way I can keep everything versioned without needing FTP and I find it fast. But is this a good practice to deploy with GIT?
GULP
With GULP, things change a bit. There are two folders: dist which is the "production" or deploy folder, so I understand; and the app folder which is the folder I'm working in, development folder.
If I do deploy with GIT, is there a way to CLONATE only the DIST folder on the server via SSH? And if you are deploying with GULP itself via FTP, would it be a good practice?
I know (or think I know) to deploy both ways, but I wanted to understand a more correct practice of doing that. I use GIT to version my projects and wanted to use GULP, but I do not know if I should version the two folders (dist and app).