ci workflow

This commit is contained in:
2022-07-07 02:23:41 +03:00
parent 862cbd3af1
commit 57ebf51a0a

View File

@@ -14,15 +14,15 @@ clone:
steps:
- name: fetch remote
commands:
- cd /home/webmaster/warframe-center && git fetch --all && git reset --hard origin/monorepo
- cd /home/webmaster/warframe-center && git fetch --all && git reset --hard origin/monorepo-ts
- name: install dependencies
commands:
- export PATH=$PATH:/home/webmaster/.nvm/versions/node/v16.14.2/bin
- cd /home/webmaster/warframe-center && npm install
- cd /home/webmaster/warframe-center && yarn install --immutable
trigger:
branch:
- monorepo
- monorepo-ts
---
@@ -38,18 +38,18 @@ steps:
image: node:16
environment:
SSH_PRIVATE_KEY:
from_secret: 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
- git clone -b monorepo-ts https://git.radner.ru/anatolykopyl/warframe-center.git
- cd warframe-center
- npm install
- npm run build -w app
- yarn install --immutable
- yarn workspace frontend run build
- 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/app
- scp -o StrictHostKeyChecking=no -r ./frontend/.next webmaster@warframe.center:~/warframe-center/frontend
- |
ssh -o StrictHostKeyChecking=no webmaster@warframe.center '
[ -s ~/.nvm/nvm.sh ] && source ~/.nvm/nvm.sh &&
@@ -62,4 +62,4 @@ depends_on:
trigger:
branch:
- monorepo
- monorepo-ts