Your root directory might look now like:
.
├── data
├── delete-old-backups.sh # <------ Delete backups older than 15 days
├── deploy-and-backup-gatsby.sh # <------ Deploy and backup "old" public directory
├── gatsby-browser.js
├── gatsby-config.js
├── gatsby-node.js
├── gatsby-ssr.js
├── manifest-config.js
├── node_modules
├── package.json
├── package-lock.json
├── public
├── README.md
├── src
├── tailwind.config.js
└── yarn.lock
At Uberspace you'll only have to type
crontab -e
and a visual texteditor will open your cronjob table. Edit it and add the paths to your deploy and backup scripts.
Now you will get every day two emails with a status log. If the deployment failed, the "old" public directory will be restored and your website will habe almost no downtime.