Deploy HTML/PHP website from GitLab repository to another folder inside same server

I have installed Gitlab CE on my own server, and works perfectly. Now I have a website project inside a repository and I want to deploy it inside the same server where is installed gitlab.
I have nginx, and GitLab is accessible on and I want to visit my website project on deploying every push in /var/www/

I have searched a lot on the web to find a solution, and maybe I can do this using GitLab CI and Capistrano to deploy it, but I haven’t understand how do it.

So I have some questions:

  1. Is GitLab CI and Capistrano the right tools to do this?
    If yes:
  2. Where do I have to install Capistrano? On my local machine, or on the development/production server (where I have installed GitLab and Nginx)?
  3. What are the right parameters for .gitlab-ci.yml and Capistrano?


As its on the same server you could do a local rsync as a deploy job inside your .gitlab-ci.yml file e.g.

    stage: deploy
        - rsync . /var/www/

obviously add any arguments you need to the rsync command for excluding unnecessary directory / files etc.