Small scripts, big leverage
The most valuable files in this repository are about forty lines long. They are shell scripts, and they hold all the logic that matters.
Keep the logic out of the CI configuration
A CI workflow is awkward to test: you push, wait and read a log. A script is easy to test: you run it. So the workflows here only call scripts, and the scripts run the same on a laptop and in CI.
Fail loudly
Start every script with strict settings so a failure stops it instead of being ignored. Check that required inputs exist and say what is missing in plain words.
Refuse to do damage
The deploy script will not upload unless the build output contains the expected files. A broken build therefore cannot wipe the live site, even though the upload deletes files that no longer exist.
Test the failure paths
It is easy to test that a script succeeds. It is more useful to test that it fails when it should: break the build on purpose and prove that nothing was uploaded.
Lint them
A linter such as shellcheck catches the quoting mistakes that bite months later. Running it on every push costs nothing.