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: