From c44e99d01d014158e0e2e001cf2f283ece93126c Mon Sep 17 00:00:00 2001 From: vladimirkutkovoy Date: Wed, 11 Sep 2024 13:49:42 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB(?= =?UTF-8?q?=D0=B0)=20=D0=BD=D0=B0=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 07913fd..5220aa6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,11 +2,30 @@ kind: pipeline name: default steps: -- name: test_node123 +- name: build image: node commands: - npm install - npm run build + +- name: deploy + image: alpine + environment: + HOST: blog.example.ru + USER: droneci + WEB_DIR: /var/www/blog.example.ru/ + SSH_KEY: + from_secret: ssh_key + commands: + - apk add --no-cache rsync openssh + - mkdir ~/.ssh/ + - chmod 0700 ~/.ssh + - echo -e "$SSH_KEY" > ~/.ssh/id_rsa + - chmod 0600 ~/.ssh/id_rsa + - echo StrictHostKeyChecking no >> ~/.ssh/config + - chmod 0600 ~/.ssh/config + - rsync -rvzc --chmod=g=rwX --delete public/ $USER@$HOST:$WEB_DIR + - name: telegram notification image: appleboy/drone-telegram settings: