Madridista
Madridista

Reputation: 99

how deploy my sites with a GITLAB

I would like to know if there's possibility of deployment (Website) on a prod server with GIT?

Let me explain:

I have a team who work locally, it working with GIT, we would after completing the development, deploy on a server PREPROD and in a second time, Deploy on PROD server?

Thank you in advance,

Upvotes: 9

Views: 20484

Answers (2)

Raphael Mäder
Raphael Mäder

Reputation: 838

My answer from a possible duplicate of this question:

You probably want to use GitLab Pages. The documentation provided is quite detailed, you shouldn't have any problems following it. GitLab Pages is an EE- and Gitlab.com-only feature, though. If you're using GitLab CE, you can use this community solution: gitlab-ce-pages.

I have implemented the linked project in my own GitLab instance, and can confirm works as expected. Just follow the instructions on the Github page linked above.

Upvotes: 0

VonC
VonC

Reputation: 1324218

You would need, with gitlab, to use a webhook (same idea as with GitHub), in order to trigger a git pull from your prod environment.

See an example of a Gitlab webhook at "How to setup Gitlab with post-receive hook?".

Note: that webhook doesn't have to be in php: you can see more details and a different example in "Jenkins Gitlab Hook Plugin".

Upvotes: 7

Related Questions