Better Website Deployment
I've been procrastinating at making my website deploy autmatically, but I have finally implemented it through SSH. In the past I had tried to implement it with WewDAV, but it turned out to be a lot of effort to implement with nginx.
My Git server (Gitea) has an action script that is set up. It will compile the static PHP pages I have, and create a neat folder for me to upload to my server. The compilation script is a simple makefile that invokes a few php and basic system commands.
I found out how somebody had created a simple GitHub Action that I can use to
deploy the website over rsync
over ssh/sftp. So in order to setup everything
I created a system user, and gave it the permissions to access the web server
path. I also created a public/private keypair for it to communicate secutrely
to my server with.
The GitHub action twitches a bit because it also tries to chmod
some files,
but the existing files are owned by my user account. But that is not exactly
necessary for it to work. Hopefully I will use this blog more often to speak
of what I do on my off time. Or at least share some things I found neat over
time.