Files
social-mcp/.gitea/workflows/deploy.yml
T
kurihada fab07d4288
Build and Deploy / build-and-deploy (push) Waiting to run
Simplify Gitea Actions workflow
2026-06-01 16:58:04 +08:00

62 lines
1.8 KiB
YAML

name: Build and Deploy
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build XHS image
run: docker build --build-arg APP_NAME=xhs-mcp -t social-mcp-xhs:latest .
- name: Build XHH image
run: docker build --build-arg APP_NAME=xhh-mcp -t social-mcp-xhh:latest .
- name: Deploy
run: |
docker stop mcp-xhs || true
docker rm mcp-xhs || true
docker stop mcp-xhh || true
docker rm mcp-xhh || true
mkdir -p /data/mcp-xhs /data/mcp-xhh
chown 1001:1001 /data/mcp-xhs /data/mcp-xhh
docker run -d \
--name mcp-xhs \
--network nginx \
-p 9527:9527 \
--shm-size=1g \
-v /data/mcp-xhs:/home/appuser/.social-mcp-xhs \
-e NODE_ENV=production \
-e HOST=0.0.0.0 \
-e PORT=9527 \
-e HEADLESS=true \
-e COOKIE_DIR=/home/appuser/.social-mcp-xhs \
-e APP_NAME=xhs-mcp \
-e ALLOW_REMOTE=yes-i-understand-the-risk \
--restart unless-stopped \
social-mcp-xhs:latest
docker run -d \
--name mcp-xhh \
--network nginx \
-p 9528:9528 \
--shm-size=1g \
-v /data/mcp-xhh:/home/appuser/.social-mcp-xhh \
-e NODE_ENV=production \
-e HOST=0.0.0.0 \
-e PORT=9528 \
-e HEADLESS=true \
-e COOKIE_DIR=/home/appuser/.social-mcp-xhh \
-e APP_NAME=xhh-mcp \
-e ALLOW_REMOTE=yes-i-understand-the-risk \
--restart unless-stopped \
social-mcp-xhh:latest