Files
你的用户名 237c7802e5
Some checks failed
Deploy / deploy (push) Has been cancelled
Initial commit: Telegram Management System
Full-stack web application for Telegram management
- Frontend: Vue 3 + Vben Admin
- Backend: NestJS
- Features: User management, group broadcast, statistics

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 15:37:50 +08:00

59 lines
1.8 KiB
YAML

name: Deploy
on:
push:
branches: ["main"]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
env:
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
DEPLOY_PASSWORD: ${{ secrets.DEPLOY_PASSWORD }}
DEPLOY_PORT: ${{ secrets.DEPLOY_PORT || '22' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Prepare deployment archive
run: |
mkdir -p release
tar czf release/release.tar.gz \
--exclude='./.git' \
--exclude='./.github' \
--exclude='./release.tar.gz' \
--exclude='./node_modules' \
--exclude='*/node_modules' \
--exclude='./logs' \
--exclude='*/logs' \
--exclude='*.log' \
.
- name: Upload bundle to server
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ env.DEPLOY_HOST }}
username: ${{ env.DEPLOY_USER }}
password: ${{ env.DEPLOY_PASSWORD }}
port: ${{ env.DEPLOY_PORT }}
source: "release/release.tar.gz,deploy/remote-deploy.sh"
target: "/tmp/telegram-management-system"
- name: Deploy on remote host
uses: appleboy/ssh-action@v0.1.10
with:
host: ${{ env.DEPLOY_HOST }}
username: ${{ env.DEPLOY_USER }}
password: ${{ env.DEPLOY_PASSWORD }}
port: ${{ env.DEPLOY_PORT }}
script: |
set -euo pipefail
chmod +x /tmp/telegram-management-system/deploy/remote-deploy.sh
/tmp/telegram-management-system/deploy/remote-deploy.sh \
/tmp/telegram-management-system/release/release.tar.gz \
/opt/telegram-management-system \
docker-compose.yml