possiblylinux127@lemmy.zip 5 days ago
First make make a script that deploys it. Then convert that script into a workflow. In the end your workflow will be 4 steps:
- Checkout the repo
- Build app
- Create SSH key
- Copy to host and restart service
For the SSH key I would encode it via base64 before storing it as a forgejo secret. You can do via something like this:
cat private.key | base64 -w 0
And then in your workflow
echo $APP_SSH_KEY | base64 -d > ~/.ssh/id_ed25519 (assuming you use ed25519 which is the default key)
myrmidex@belgae.social 5 days ago
This is what I prefer, with version tags instead of latest. Then I update the tag manually in the compose file and redeploy.