This commit is contained in:
@kirill.komarov
2026-06-17 15:05:05 +05:00
parent 8de49b5391
commit c585abab8e
+5 -12
View File
@@ -3,16 +3,16 @@ when:
event: [push, manual] event: [push, manual]
steps: steps:
install-client: install:
image: node:20 image: node:20
commands: commands:
- cd client && npm install - cd client && npm install
build-client: build:
image: node:20 image: node:20
commands: commands:
- cd client && npm run build - cd client && npm run build
depends_on: [install-client] depends_on: [install]
deploy: deploy:
image: alpine:latest image: alpine:latest
@@ -24,12 +24,5 @@ steps:
- mkdir -p /ssh - mkdir -p /ssh
- echo "$DEPLOY_KEY" > /ssh/deploy_key - echo "$DEPLOY_KEY" > /ssh/deploy_key
- chmod 600 /ssh/deploy_key - chmod 600 /ssh/deploy_key
- ssh -i /ssh/deploy_key -o StrictHostKeyChecking=no root@192.168.1.80 ' - ssh -i /ssh/deploy_key -o StrictHostKeyChecking=no root@192.168.1.80 'cd /opt/min-chat && git pull origin main && cd server && npm install --omit=dev && cd .. && cd client && npm install && npm run build && cd .. && cp -r client/dist/* /var/www/html/ 2>/dev/null || true && systemctl restart chat-app'
cd /opt/min-chat && depends_on: [build]
git pull origin main &&
cd server && npm install --omit=dev && cd .. &&
cd client && npm install && npm run build && cd .. &&
cp -r client/dist/* /var/www/html/ 2>/dev/null || true &&
systemctl restart chat-app
'
depends_on: [build-client]