feat: add deployment automation - #4233
Conversation
- Add backend CI/CD: Go build + deploy via SSH, auto-rollback on failure - Add frontend CI/CD: Cloudflare Pages deployment - Add deploy scripts: first-time setup (Nginx + SSL) and update deploy - Add systemd service, Nginx reverse proxy template, .env.example - Add deployment documentation with scaling guide - Remove unused upstream workflows (Docker, Electron, Gitee sync, etc.) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (15)
WalkthroughThis PR removes legacy Docker image and release workflows while introducing two streamlined GitHub Actions pipelines (backend Go binary compilation with testing, and frontend Vite build). It adds complete server deployment automation infrastructure including systemd service configuration, Nginx reverse proxy setup, bash deployment scripts, and environment templates for managing the new-api backend service on Ubuntu servers. Changes
Sequence DiagramsequenceDiagram
participant GHA as GitHub Actions
participant Server as Ubuntu Server
participant Systemd as systemd
participant Nginx as Nginx
participant Backend as new-api Backend
participant Verify as Verification
GHA->>GHA: Compile new-api binary
GHA->>Server: SCP upload binary & deploy/ dir
GHA->>Server: SSH execute deploy/deploy.sh
Server->>Server: Validate binary & .env
Server->>Server: Backup previous binary
Server->>Server: Create new-api user/dirs
Server->>Systemd: Install/reload service unit
alt First Deploy with Domain
Server->>Server: Generate/update Nginx config
Server->>Server: Run certbot for SSL certs
end
Server->>Systemd: Start new-api service
Systemd->>Backend: Execute /opt/new-api/new-api
Systemd->>Systemd: Load .env environment
Server->>Nginx: Reload configuration
Nginx->>Nginx: Verify SSL certs & config
Server->>Verify: Check port listening (ss)
Verify->>Nginx: HTTPS request to /api/status
Nginx->>Backend: Proxy request
Backend->>Verify: Response
Verify->>Server: Verification complete
Server->>GHA: Deployment success/failure
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit