diff --git a/.woodpecker/build-html-copy-to-server.yaml b/.woodpecker/build-html-copy-to-server.yaml index 088fae8..67c5ee4 100644 --- a/.woodpecker/build-html-copy-to-server.yaml +++ b/.woodpecker/build-html-copy-to-server.yaml @@ -37,12 +37,6 @@ steps: TARGET_PATH: from_secret: target_path commands: - - - DEST_PATH_BASE=public/oer_community/sb/blog - #- if [ "$CI_COMMIT_BRANCH" != "main" ]; then echo "not
"; 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 - mkdir -p ~/.ssh - 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 - chmod 600 ~/.ssh/known_hosts - - ssh -i ~/.ssh/deployKey -p $SSH_PORT $SSH_USER@$SSH_HOST "mkdir -p $DESTINATION_PATH" - - scp -r -i ~/.ssh/deployKey -P $SSH_PORT sb/public/* $SSH_USER@$SSH_HOST:$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:$TARGET_PATH/