diff --git a/.drone.yml b/.drone.yml index da9b214..9ac3a81 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,24 +1,39 @@ +kind: pipeline +type: ssh +name: install dependencies + +clone: + disable: true + +server: + host: warframe.center + user: webmaster + ssh_key: + from_secret: ssh_private_key + +steps: +- name: fetch remote + commands: + - "cd /home/webmaster/warframe-center && \ + git fetch --all && \ + git reset --hard origin/monorepo" +- name: install dependencies + commands: + - "cd /home/webmaster/warframe-center && \ + npm install" + +trigger: + branch: + - monorepo + +--- + kind: pipeline type: docker name: build clone: disable: true - -steps: -- name: install dependencies - image: kroniak/ssh-client - 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 && source ~/.profile && npm install" - when: - branch: - - monorepo - name: bulid frontend image: node:16 @@ -37,6 +52,7 @@ steps: - chmod 400 ~/.ssh/id_rsa - scp -o StrictHostKeyChecking=no -r ./app/.next webmaster@warframe.center:~/warframe.center - ssh -o StrictHostKeyChecking=no webmaster@warframe.center "pm2 restart warframe-center-app-3000" - when: - branch: - - monorepo + +trigger: + branch: + - monorepo