How to use Github hooks when you disabled the root user
For security reasons, I disabled the root user and created a new user to use SSH.
When I use
rsync, I rsync to the /home/my-name/my-dir directory and then mv to the /var/www/html/my-dir director, then used sudo chown -R www-data:www-data my-dir.
I’d like to create a Github hook that when I push to the repo, pulls the repo to my droplet.
Q1. Should I pull to /home/my-name/my-dir and them moved to the /var/www/html/my-dir and use chown command to change the owner?
Q2. Is there any tutorial how to set this up?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×