I ran in to a little issue with my publish.sh script that I use to automatically publish my site with Hugo. I wipe out the public folder and then rebuild the site with Hugo. After that is done, the public folder is synced to the web host, using the --delete option. The problem arises if Hugo encounters an error. The site isn’t rebuilt but the now empty public folder is synced, wiping out the website.