Files
xiezheng_h5/.drone.yml
编码猿 1c408990d9
Some checks reported errors
continuous-integration/drone/push Build encountered an error
SSH_IP
2024-12-01 00:53:03 +08:00

34 lines
955 B
YAML

kind: pipeline
type: docker
name: default
clone:
disable: true
steps:
- name: copy
image: drone/git:latest
network_mode: host
environment:
SSH_PASSWORD:
from_secret: ssh_password
SSH_USERNAME:
from_secret: ssh_username
SSH_IP:
from_secret: ssh_ip
SSH_STATIC_PATH:
from_secret: ssh_static_path
SSH_CLONE_URL:
from_secret: git_clone_url
commands:
- echo "${$SSH_IP} git.buyusdt.xyz" >> /etc/hosts
- git config --global http.sslVerify "false"
- git clone $SSH_CLONE_URL
- sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
- apk add --no-cache sshpass
- sshpass -p $SSH_PASSWORD scp -o StrictHostKeyChecking=no -r /drone/src/xiezheng_h5/* $SSH_USERNAME@$SSH_IP:$SSH_STATIC_PATH
# volumes:
# - name: 1panel-nginx-static
# host:
# path: /home/bmy/1panel/apps/openresty/openresty/www/sites/site.buyusdt.xyz/index/xz/