Trigger a git pull at URL request

Hello Forum,

My question is how to automaticly deploy a project to another server if a developer succesfully have built it and pushed?
Here is what I’ve done so far: (I’m on, not custom server, yet)

  • Created a .gitlab-ci.yml to build my laravel 5 project (works like a charm)
  • Created a post-recieve hook in the .git/hook folder with the following in it:
echo "Triggering the code deployment ..."
wget -q -O /dev/null
  • Created the deploy.php mentioned above with the following in it:

What happens: Nothing.
When I go to the deploy.php manually it shows me that pretty site, writes out information about echo $PWD, whoami, git status (no changes, etc…) and that’s it. Why doesn’t it executes the pull and the rest?