Files
warframe-center/.drone.yml
Anatoly 3f3e851590
Some checks failed
continuous-integration/drone/push Build is failing
Source profioe
2022-03-22 17:05:05 +03:00

43 lines
1.1 KiB
YAML

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
environment:
SSH_PRIVATE_KEY:
from_secret: ssh_private_key
MONGODB_URI:
from_secret: MONGODB_URI
commands:
- git clone -b monorepo https://git.radner.ru/anatolykopyl/warframe-center.git
- cd warframe-center
- npm install
- npm run build -w app
- mkdir ~/.ssh
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
- 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