# Files to interact with Hugo ## Introduction: A bash script to deploy a local Hugo installation to a remote server, then perform a backup ## Files: Execute with bash: * bash deploy.sh To see the coloured prompts * ### [deploy.sh] This script will: * Stop the Hugo dev-server * chown the remote web server directory (take ownership) * Remove any existing content on the remote web server * Remove any existing local Hugo '/public' content * Build the new local Hugo website * Copy the Hugo '/public' content to the remote web server * chown the remote web server directory (give ownership to www-data) * Backup (rsync) the working directory * Clear out the Hugo generated '/public' folder before syncing (no need to store this in Forgejo) * Push '/path/to/git/hugo/' to Forgejo * Start the Hugo dev-server