diff --git a/.drone.yml b/.drone.yml index a2be84b..fc8c5eb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,26 +1,3 @@ -kind: pipeline -type: ssh -name: install dependencies - -clone: - disable: true - -server: - host: warframe.center - user: webmaster - password: - from_secret: password - -steps: -- name: install - commands: - - cd /home/webmaster/warframe-center - - git fetch --all - - git reset --hard origin/monorepo - - /home/webmaster/.nvm/versions/node/v16.14.2/bin/npm install - ---- - kind: pipeline type: docker name: build @@ -29,6 +6,20 @@ clone: disable: true steps: +- name: install dependencies + image: alpine + environment: + SSH_PRIVATE_KEY: + from_secret: ssh_private_key + commands: + - mkdir ~/.ssh + - echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa + - chmod 400 ~/.ssh/id_rsa + - ssh -o StrictHostKeyChecking=no webmaster@warframe.center "cd /home/webmaster/warframe-center && git fetch --all && git reset --hard origin/monorepo && npm install" + when: + branch: + - monorepo + - name: bulid frontend image: node:16 environment: