Deploying
GitHub Actions
Deploy on every push to main. It's an ordinary git push with a key of its own.
1Create a key for GitHub#
2Save it as a secret#
Save the contents of deploy_key as a repository secret named JOKKU_DEPLOY_KEY, then delete the file from your laptop.
3Add the workflow#
The build output streams into the Actions log, and a failed deploy fails the job, while the previous version keeps serving.
Why fetch-depth: 0#
A shallow clone can't be pushed to a new remote, so the checkout needs the full history.