move ssh setup to script
All checks were successful
ci/woodpecker/push/build-and-deploy Pipeline was successful

we want to see the output of the deploy steps in the UI
doesn't happen if it's a scipt
not sure this will work
This commit is contained in:
maren 2024-01-08 09:48:18 -05:00
parent 6ce4bf46bd
commit ac32443f1c
2 changed files with 8 additions and 5 deletions

View file

@ -18,11 +18,7 @@ steps:
secrets: secrets:
- deploy_ssh_key - deploy_ssh_key
commands: commands:
- apk add openssh-client - ./.woodpecker/ssh.sh
- mkdir -p $HOME/.ssh
- ssh-keyscan -t ed25519 turtle.hup.is >> $HOME/.ssh/known_hosts
- echo "$DEPLOY_SSH_KEY" > $HOME/.ssh/id_ed25519
- chmod 0600 $HOME/.ssh/id_ed25519
- ./.woodpecker/deploy.sh - ./.woodpecker/deploy.sh
when: when:
# Only try to deploy if previous step is successful # Only try to deploy if previous step is successful

7
.woodpecker/ssh.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh -e
apk add openssh-client
mkdir -p $HOME/.ssh
ssh-keyscan -t ed25519 turtle.hup.is >> $HOME/.ssh/known_hosts
echo "$DEPLOY_SSH_KEY" > $HOME/.ssh/id_ed25519
chmod 0600 $HOME/.ssh/id_ed25519