Deployment from git to virtual hosting

Started by lamnzxzfd, Nov 21, 2022, 12:33 AM

Previous topic - Next topic

lamnzxzfdTopic starter

Greetings!
I have a question - am I doing the right manual site deployment from github to the server.
On the local computer, I make up and build a website, then send it to github. Next, I log in via ssh to virtual hosting and cloning the project.

And in general, everything works. And what confuses me is that I keep both the source code and the finished assembly on the github.
Accordingly , all sources are also pulled to the hosting along with the folder .git. And it seems that this is somehow not particularly correct.

As one of the options, I named the folder with the assembly public_html and clone it to the shared folder with the site for hosting.
 So, on the hosting, only the assembly gets into the public_html folder (accessible from outside). It's already better, but all the sources, although they don't fall into public_html, are still pulled to hosting.
It seems that I'm not catching up with something - please help the beginner.

p.s. We are talking about a simple manual deployment without hooks and CI deployment.
  •  

PrimoPierotz

Collect locally, and instead of logging into the server via ssh, send the already collected data there via scp/rsync.
To be honest, I don't even remember what he is, a manual deployment. All I remember is that at that time we collected the project directly on the server..
But I will tell you for sure - it is unacceptable to store the assembly in the git together with the source code. Even without ci, it would be possible to write a script that would collect, archive and then copy the scp project to a remote server. Well, okay, even just with your hands you can do it all. - collect the archive, copy it to the server and unpack it.
  •  

outsourcelink

To use or do anything in Git, you need repositories either on your local computer or in your GitHub, GitLab, or bitbucket account.
Do you want to deploy these repositories on your real server via cPanel?
Have you used the manual method of downloading your repositories from GitHub, GitLab or Bitbucket, and then downloaded manually through the cPanel file manager tool?

If YES, we will show you how you can automatically deploy your repositories to cPanel by following a few simple steps.
If you have the appropriate permissions, you can host a local git repository with a remote online repository (Github/bitbucket, etc.) in a cPanel account.
Reminder: Git is an open source Version Control System (VCS) that tracks the history and versions of content (files and directories). It manages changes in the project without overwriting any part of the project.
This allows developers to collaborate and work on a project at the same time.
  •