Deploy with GitLab

Hi guys!

I have installed gitlab server on my VPS.
I made a project, cloned it to my local.
If i change something on my local, i commit and push it.
Gitlab.yml file copy the files from /root/builds … directory to /var/www directory, and it runs some another tasks (add virtual host, restart apache…).

So my deploy system is working fine.

But, if i change something on my server (for example i have a wordpress project and the client edit the translate files .po, .pot, .mo files i can’t pull the changes because I copied project files from /root/builds/ to /var/www. So that way if i make some fixes, the language files will overwritten with my local changes.

Is there any solution about this problem?

The second problem is, that way after every build i have to duplicate the project files, so i run out my storage very quickly… builds directory is bigger than /var/www. I think this is not so good solution to deploy my files.

The short question is:
How should i handle deploying from my local to server (where gitlab installed) and if there is any changes to on remote site i would like to pull them to my local. Is it possible?

Thank you :slight_smile:
Peter