G
G
greencost2019-06-27 07:53:39
git
greencost, 2019-06-27 07:53:39

Simple manual deployment from git to shared hosting?

Good afternoon!
I have a question - am I doing the manual deployment of the site from github to the server correctly.
On the local computer, I create and build the site, then send it to gitub. Next, I go via ssh to virtual hosting (in my case - beget) and clone 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 source codes are also pulled to the hosting along with the .git folder. And it seems that this is somehow not very 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. Thus, on hosting, only the assembly gets into the public_html folder (accessible from outside). It's already better, but although all the sources do not get into public_html, they still reach for the hosting.
It seems that I'm not catching up with something - please help a newbie)
ps We are talking about a simple manual deployment without hooks and deploying CI.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2019-06-27
@greencost

Build locally, and instead of logging in to the server via ssh, send it already built via scp/rsync.
Why push it to the git to immediately go and get it from there?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question