This is the bash script I use to update my server. It’s run via a crontab:

#! /bin/bash
 
cd /opt/dg-web/quartz/content
 
log_file="/opt/dg-web/scripts/dg-web.log"
 
exec &>> $log_file
 
pull_output=$(git pull)
 
if [[ $pull_output == *"Already up to date."* ]]; then
        echo "No new changes pulled.\n\n"
else
        cd /opt/dg-web/quartz
        npx quartz build --output /opt/dg-web/www
        echo "\n\nChanges pulled and built successfully\n\n"
fi

I don’t think there is anything in the script that should expose me, but I’ve been hacked before.