You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

28 lines
835 B

kind: pipeline
type: exec
name: deploy
clone:
disable: true
trigger:
branch:
- deploy
event:
- push
steps:
- name: deploy
environment:
DEPLOY_SSH_KEY:
from_secret: DEPLOY_SSH_KEY
commands:
- export HOME=/root
- mkdir -p "$HOME/.ssh"
- chmod 700 "$HOME/.ssh"
- 'printf "%s\n" "$DEPLOY_SSH_KEY" > "$HOME/.ssh/id_rsa"'
- chmod 600 "$HOME/.ssh/id_rsa"
- 'ssh-keyscan -H gitee.com > "$HOME/.ssh/known_hosts"'
- chmod 644 "$HOME/.ssh/known_hosts"
- 'export SSH_OPTS="-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 $SSH_OPTS -T gitee.com || true'
- 'echo HELLO WORLD'