../new-deployment

New_deployment

Hey everyone!

I followed the Hugo documentation on how to deploy the website to VPS using rsync. Now, I can deploy the website from my computer to the host server just by navigating to my website directory and running the script ./deploy. Hopefully I will be able to put out more content now.

UPDATE 08/12/2024: I will add this to other relevant pages but this is the deploy script:
deploy.sh

#!/bin/sh
USER=root
HOST=joshlau.xyz
DIR=/var/www/joshlauxyz/   # the directory where your web site files should go

zola build && rsync -avz --delete public/ ${USER}@${HOST}:${DIR} # this will delete everything on the server that's not in the local public folder

exit