Web-site hosting

I’m looking into solutions for web-hosting.
I like the concept of Pelican app with markdown.

I generally want to use git (forgejo on ynh) so I can push content from my laptop, and pull to the server.

But there are some owner/permissions to take care of.
/var/www/ folders are typically owned by www-data

Is there a reccomended way of doing this without messing up things?