Merge branch 'main' of https://gitea.mpak-8501.ru/admin/min-chat
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
+28
-28
@@ -1,28 +1,28 @@
|
|||||||
when:
|
when:
|
||||||
branch: main
|
branch: main
|
||||||
event: [push, manual]
|
event: [push, manual]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
install:
|
install:
|
||||||
image: node:20
|
image: node:20
|
||||||
commands:
|
commands:
|
||||||
- cd client && npm install
|
- cd client && npm install
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: node:20
|
image: node:20
|
||||||
commands:
|
commands:
|
||||||
- cd client && npm run build
|
- cd client && npm run build
|
||||||
depends_on: [install]
|
depends_on: [install]
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
environment:
|
environment:
|
||||||
DEPLOY_KEY:
|
DEPLOY_KEY:
|
||||||
from_secret: deploy_key
|
from_secret: deploy_key
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache openssh
|
- apk add --no-cache openssh
|
||||||
- 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 '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'
|
- 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'
|
||||||
depends_on: [build]
|
depends_on: [build]
|
||||||
|
|||||||
Reference in New Issue
Block a user