From 803ea825c8cd1dc60b132b885332edfba81f04e3 Mon Sep 17 00:00:00 2001 From: BryantHe Date: Tue, 14 Jun 2022 19:34:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=20drone=20=E6=96=87=E4=BB=B6?= =?UTF-8?q?=206?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index cd3abab..d4892b8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -18,4 +18,18 @@ steps: - name: run image: python:3.9.13-alpine3.15 commands: - - python3 test.py \ No newline at end of file + - python3 test.py +- name: deploy + image: appleboy/drone-ssh + settings: + host: 118.25.83.116 + username: root + # secrets 的 ssh-key 是固定用法 + # 这个参数是在 drone 中对应仓库的 secrets 选项中添加的,名字必须是 ssh_key + key: + from_secret: ssh_key + port: 22 + # stoping script after first failure + script_stop: true + script: + - echo "yulong test" > /tmp/yulong_test.drone \ No newline at end of file