From 25336f0586f49a84da04eb8a8efe1746c49dd3f2 Mon Sep 17 00:00:00 2001 From: Ching Date: Mon, 4 Mar 2024 02:32:05 +0800 Subject: [PATCH] ci: Add deployment step to .drone.yml --- .drone.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.drone.yml b/.drone.yml index 9e81ebc..4fdf87e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -30,6 +30,24 @@ steps: # when: # status: [success, failure] # https://discord.com/api/webhooks/1213409068559900683/szl0AICZwA1V82dg8Vrc_xqOCl1WwnxktlQdf4cdILswR-xZBI5-JOdqGSD8dVUNcUlH + - name: deploy + image: appleboy/drone-ssh + settings: + host: + - 148.135.109.242 + username: root + key: + from_secret: ssh_key + port: 22 + command_timeout: 2m + script: + - echo "Pull new image" + - docker pull git.tunpok.com/ching/grocy-barcode-helper:latest + - echo "Go to the project directory" + - cd /root/develop/grocy-barcode-helper + - echo "Restart the container" + - docker-compose down && docker-compose up -d + - name: discord notification image: appleboy/drone-discord settings: