I am running a Kirby site on a droplet following the steps on this tutorial: How To Set Up Automatic Deployment with Git with a VPS
In order to use the panel and editing the content folder on the server I changed the permissions to: sudo chown -R www-data:www-data directory
But know I am unable to push to the remote repo due the fact the permissions has changed.
I have to manually change that stuff before and after I push to the remote.
How are other users handle that issue?
This is by far the common way to deploy sites in production and I am interested how to solve it!
I used two hooks, the post-checkout hook and the post-merge hook with the said content, I always did a pull on the remote server from the remote repo, I think, then the two hooks on the server did their job.
The setup described in the tutorial is a bit different and accordingly the hook to use, but the general procedure should be similar.