This commit is contained in:
aipper 2025-05-27 15:17:07 +08:00
parent 79c5ebc426
commit 70da05aba6

View File

@ -53,12 +53,10 @@ steps:
- name: deploy-to-server
image: appleboy/drone-ssh # 使用 SSH 插件
settings:
host:
from_secret: 10.0.0.210
username:
from_secret: root
key:
from_secret: ssh_private_key # SSH 私钥内容
host: 10.0.0.210
username: root
password:
from_secret: ssh_password
port: 22 # SSH 端口,默认为 22
# passhprase: from_secret: ssh_passphrase # 如果你的 SSH key 有密码
script:
@ -78,7 +76,7 @@ steps:
- push
# (可选) 定义卷用于缓存,例如 Maven 依赖
# volumes:
# - name: maven-cache
# host:
# path: /tmp/cache/maven # 将 Runner 主机上的目录挂载到构建步骤中
volumes:
- name: maven-cache
host:
path: /tmp/cache/maven # 将 Runner 主机上的目录挂载到构建步骤中