if the application requires environment we can put it on /home/web/aocweb/.env
create /etc/systemd/system/aocweb.service
To make sure we can run systemctl restart with sudo without password. Create sudo configuration file (make sure to use visudo so you don't accidentally locked your self.
With content
Deploy with Github Action
Generate SSH key for deployment
example with that command I created 2 files on ~/.ssh/ : aocweb & aocweb.pub
add generated public key to server
Copy the content of aocweb.pub to /home/web/.ssh/authorized_key. This allows login with ssh private key. Test that you can login to the server with that key (check ssh -v output)