V
V
Vladislav2020-03-16 10:45:18
GitLab
Vladislav, 2020-03-16 10:45:18

How to connect a remote repository with hosting?

I use Beget because Git is already there, but I don't know if this is what I need. Prompt you.
Look, there is a website site.ru
on gitlab that contains all the files of this site (copy) with the exception of files with database passwords.
I clone this repository to my LAN.
I change it and the bullet back to gitlab, and all the changes that I sent to the remote repository in gitlab appeared immediately on site.ru

Krch, having changed the files on gitlab, changes on the site.
How to implement this. All that I could dig up was that you need to do something with the .gitlab-ci.yml
file. But I didn’t understand what and how, beget hosting.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergei Iamskoi, 2020-03-16
@cr1gger

You need to write in this file a command that will deploy the site to hosting. For example, deploy via SSH connection and execute git pull on it:

ssh [email protected] -T  'cd ~/site.ru && git pull'

Of course, you also need to register
the gitlab key in the ~/.ssh/authorized_keys file on the
server . com/gitlab-org/gitlab-foss/tree/mas... https://gitlab.com/gitlab-examples

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question