| name | xianwen-deploy |
| description | Xianwen Online full deployment workflow: commit, push, build, deploy server (Hetzner SSH) + web client (GitHub Pages) + itch.io, release versioning, CI/CD fix. Use when user says 'deploy', 'commit/push', 'release', '進版', '部署'. |
Xianwen Deploy Workflow
Complete deployment pipeline for Xianwen Online, extracted from 999+ development sessions.
Deployment Targets
| Target | Method | URL |
|---|
| Server (Rust) | SSH to Hetzner VPS → docker compose build && up | 5.223.42.8 |
| Web Client (Vue) | GitHub Actions → GitHub Pages | play.xianwen.online |
| Desktop (Tauri) | GitHub Actions → itch.io release | DuDuStudio on itch.io |
CRITICAL: No GHCR
NEVER use GHCR Docker push. Always SSH directly to Hetzner and build on the server.
Standard Deploy Flow
1. Pre-deploy Checks
cd server && cargo check && cargo clippy && cargo fmt --check
cd web-client && pnpm run build:web
2. Commit & Push
git add <specific-files>
git commit -m "<type>: <description>"
git push origin main
3. Deploy Server
ssh root@5.223.42.8 "cd /opt/xianwen-online && git pull && docker compose build && docker compose up -d"
4. Deploy Web Client
Web client deploys automatically via GitHub Actions on push to main. If CI fails:
- Check
vue-tsc type errors first — most common failure cause
- Check missing exports/imports in stores and components
- Run
pnpm run build:web locally to reproduce
5. Deploy to itch.io
Desktop builds require:
- Tauri signing key configured in CI secrets
- Version bump in
tauri.conf.json
- GitHub Release creation triggers itch.io upload
Release Versioning
Format: v0.1.X (currently in early development)
git tag v0.1.X
git push origin v0.1.X
Common CI/CD Failures
| Error | Fix |
|---|
vue-tsc type errors | Fix TypeScript types, check missing exports |
| GitHub Actions storage full | Clean old artifacts/releases |
| Tauri signing fails | Check TAURI_SIGNING_PRIVATE_KEY secret |
| Docker build OOM | Increase VPS swap or use --no-cache |
| Migration failure on deploy | SSH to server, run migration manually |
Post-Deploy Verification
- Check server health endpoint
- Test WebSocket connection
- Verify Discord OAuth login flow
- Check database connection pool status