das klappt nun?
All checks were successful
ci/woodpecker/push/build-html-copy-to-server Pipeline was successful

This commit is contained in:
Ludger Sicking 2024-10-16 12:38:21 +02:00
parent f0fcd5b0cb
commit 2875677784

View file

@ -37,12 +37,6 @@ steps:
TARGET_PATH: TARGET_PATH:
from_secret: target_path from_secret: target_path
commands: commands:
- DEST_PATH_BASE=public/oer_community/sb/blog
#- if [ "$CI_COMMIT_BRANCH" != "main" ]; then echo "not <main>"; echo $CI_COMMIT_BRANCH; DESTINATION_PATH="$DEST_PATH_BASE/${CI_COMMIT_BRANCH}"; fi
- DESTINATION_PATH=$TARGET_PATH
- echo $DESTINATION_PATH
- apk add --no-cache openssh - apk add --no-cache openssh
- mkdir -p ~/.ssh - mkdir -p ~/.ssh
- echo "$SSH_KEY" | tr -d '\r' > ~/.ssh/deployKey - echo "$SSH_KEY" | tr -d '\r' > ~/.ssh/deployKey
@ -50,5 +44,5 @@ steps:
- ssh-keyscan -H -p $SSH_PORT $SSH_HOST 2>/dev/null >> ~/.ssh/known_hosts - ssh-keyscan -H -p $SSH_PORT $SSH_HOST 2>/dev/null >> ~/.ssh/known_hosts
- chmod 600 ~/.ssh/known_hosts - chmod 600 ~/.ssh/known_hosts
- ssh -i ~/.ssh/deployKey -p $SSH_PORT $SSH_USER@$SSH_HOST "mkdir -p $DESTINATION_PATH" - ssh -i ~/.ssh/deployKey -p $SSH_PORT $SSH_USER@$SSH_HOST "mkdir -p $TARGET_PATH"
- scp -r -i ~/.ssh/deployKey -P $SSH_PORT sb/public/* $SSH_USER@$SSH_HOST:$DESTINATION_PATH/ - scp -r -i ~/.ssh/deployKey -P $SSH_PORT sb/public/* $SSH_USER@$SSH_HOST:$TARGET_PATH/