From ac32443f1c7fe91b561021b0ea5e029f0065b2a4 Mon Sep 17 00:00:00 2001 From: maren Date: Mon, 8 Jan 2024 09:48:18 -0500 Subject: [PATCH] move ssh setup to script 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 --- .woodpecker/{.woodpecker.yml => build-and-deploy.yml} | 6 +----- .woodpecker/ssh.sh | 7 +++++++ 2 files changed, 8 insertions(+), 5 deletions(-) rename .woodpecker/{.woodpecker.yml => build-and-deploy.yml} (68%) create mode 100755 .woodpecker/ssh.sh diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/build-and-deploy.yml similarity index 68% rename from .woodpecker/.woodpecker.yml rename to .woodpecker/build-and-deploy.yml index 6204084..015e94a 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/build-and-deploy.yml @@ -18,11 +18,7 @@ steps: secrets: - deploy_ssh_key commands: - - 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 + - ./.woodpecker/ssh.sh - ./.woodpecker/deploy.sh when: # Only try to deploy if previous step is successful diff --git a/.woodpecker/ssh.sh b/.woodpecker/ssh.sh new file mode 100755 index 0000000..64eb97c --- /dev/null +++ b/.woodpecker/ssh.sh @@ -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