how deploy my sites with a GITLAB

2020-05-27 04:40发布

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,

2条回答
可以哭但决不认输i
2楼-- · 2020-05-27 05:39

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.

查看更多
闹够了就滚
3楼-- · 2020-05-27 05:41

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".

查看更多
登录 后发表回答