diff --git a/.drone.yml b/.drone.yml index 18ada47..ed92885 100644 --- a/.drone.yml +++ b/.drone.yml @@ -36,6 +36,7 @@ steps: - chmod 600 "$HOME/.ssh/id_rsa" - 'ssh-keyscan -p 8892 -H git.xieyaxin.top >> "$HOME/.ssh/known_hosts"' - chmod 644 "$HOME/.ssh/known_hosts" - - 'if [ ! -d "$HOME/projects/nuxt4-demo/nuxt4-demo" ]; then mkdir -p "$HOME/projects/nuxt4-demo" && GIT_SSH_COMMAND="ssh -i $HOME/.ssh/id_rsa -o IdentitiesOnly=yes -o UserKnownHostsFile=$HOME/.ssh/known_hosts -o StrictHostKeyChecking=accept-new" git clone -b main "ssh://root@git.xieyaxin.top:8892/topuser/nuxt4-demo.git" "$HOME/projects/nuxt4-demo/nuxt4-demo"; else cd "$HOME/projects/nuxt4-demo/nuxt4-demo" && GIT_SSH_COMMAND="ssh -i $HOME/.ssh/id_rsa -o IdentitiesOnly=yes -o UserKnownHostsFile=$HOME/.ssh/known_hosts -o StrictHostKeyChecking=accept-new" git pull origin main; fi' + - 'GIT_SSH_COMMAND="ssh -i $HOME/.ssh/id_rsa -o IdentitiesOnly=yes -o UserKnownHostsFile=$HOME/.ssh/known_hosts -o StrictHostKeyChecking=accept-new -o BatchMode=yes -o ConnectTimeout=10 -o ServerAliveInterval=15 -o ServerAliveCountMax=3" ssh -T -p 8892 root@git.xieyaxin.top || true' + - 'if [ ! -d "$HOME/projects/nuxt4-demo/nuxt4-demo" ]; then mkdir -p "$HOME/projects/nuxt4-demo" && GIT_SSH_COMMAND="ssh -i $HOME/.ssh/id_rsa -o IdentitiesOnly=yes -o UserKnownHostsFile=$HOME/.ssh/known_hosts -o StrictHostKeyChecking=accept-new -o BatchMode=yes -o ConnectTimeout=10 -o ServerAliveInterval=15 -o ServerAliveCountMax=3" git clone --depth 1 -b main "ssh://root@git.xieyaxin.top:8892/topuser/nuxt4-demo.git" "$HOME/projects/nuxt4-demo/nuxt4-demo"; else cd "$HOME/projects/nuxt4-demo/nuxt4-demo" && GIT_SSH_COMMAND="ssh -i $HOME/.ssh/id_rsa -o IdentitiesOnly=yes -o UserKnownHostsFile=$HOME/.ssh/known_hosts -o StrictHostKeyChecking=accept-new -o BatchMode=yes -o ConnectTimeout=10 -o ServerAliveInterval=15 -o ServerAliveCountMax=3" git pull origin main; fi' - pm2 stop nuxt4-demo - pm2 start nuxt4-demo \ No newline at end of file