9

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,

1
  • 1
    Use GitLab CI for it. Commented Jan 10, 2015 at 16:43

2 Answers 2

7

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

Sign up to request clarification or add additional context in comments.

2 Comments

but it always deploys, and is always called even though the build fails.
@matejkramny then you need to make sure that script tests for the correct completion of the build (like test for the presence of a binary that the build is supposed to produce). And that deployment script should only runs if the test is successful.
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.