diff --git a/.drone.yml b/.drone.yml index af7f552..d4b05e8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,7 +26,7 @@ steps: - mkdir -p ~/.ssh - chmod 700 ~/.ssh - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - - export REMOTE_PATH=/data/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}/${DRONE_REPO_BRANCH}/$(date +'%Y%m%d-%H%M%S')-${DRONE_COMMIT_SHA:0:9}/ + - export REMOTE_PATH=/data/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}/${DRONE_BRANCH}/$(date +'%Y%m%d-%H%M%S')-${DRONE_COMMIT_SHA:0:9}/ - export SSHPASS=$${REMOTE_PASSWORD} - sshpass -e ssh $${REMOTE_USERNAME}@$${REMOTE_HOST} "mkdir -p $REMOTE_PATH" - "sshpass -e scp -r gui/target/*.jar $${REMOTE_USERNAME}@$${REMOTE_HOST}:$REMOTE_PATH" @@ -37,4 +37,8 @@ steps: REMOTE_PASSWORD: from_secret: remote_password REMOTE_HOST: - from_secret: remote_host \ No newline at end of file + from_secret: remote_host + when: + event: + - push + - tag \ No newline at end of file