Initial commit: Telegram Management System
Some checks failed
Deploy / deploy (push) Has been cancelled
Some checks failed
Deploy / deploy (push) Has been cancelled
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>
This commit is contained in:
58
.github/workflows/deploy.yml
vendored
Normal file
58
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
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
|
||||
Reference in New Issue
Block a user