How to use GitLab to deploy files directly on the webserver

Hello, I was asked to deploy a Git-like repo, so I found and set up the Gitlab community server.
Now, I was asked to find a way to deploy the files on the devrepo to the webserver automatically.

How can this be achieved?
Can you direct me to a how-to or doc for doing so?

Regards.
JG

That’s definitely Gitlab CI does

1 Like

If the pages you need to deploy are sufficiently simple you might be able to use GitLab pages - I’ve enabled it on our installations, but apart from that I don’t know much about it.

In general you can make a CI job (and in the project’s .gitlab-ci.yml say when it should run) that copies files from the runner server to the webserver, that just requires that the runner user (by default gitlab-runner) has some way of logging into the webserver with appropriate permissions, but that’s not really a GitLab issue.

1 Like

Thank you for your replies.
So, Gitlab-Ci is the way of achieving this.

Is there a good how-to? Sure I can google it, and I will find some, but any recommendations?
Anyway, again thank you.

Regards.
JG

I learned the basics looking at the .gitlab-ci.yml files my colleagues had made for some of our projects, but I suspect GitLab’s documentation is a better way, look at:


and
1 Like