|
| 1 | +# Deployment Workflow - www.konxc.space |
| 2 | + |
| 3 | +## 📊 Workflow Diagram |
| 4 | + |
| 5 | +``` |
| 6 | +┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐ |
| 7 | +│ Developer │ │ Main Branch │ │ Deploy Script │ |
| 8 | +│ │ │ │ │ │ |
| 9 | +│ 1. Make Changes │───▶│ 2. Commit & Push │───▶│ 3. Run Script │ |
| 10 | +│ │ │ │ │ │ |
| 11 | +└─────────────────┘ └──────────────────┘ └─────────────────┘ |
| 12 | + │ |
| 13 | + ▼ |
| 14 | +┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐ |
| 15 | +│ GitHub Pages │◀───│ gh-pages │◀───│ 4. Build & │ |
| 16 | +│ │ │ Branch │ │ Deploy │ |
| 17 | +│ 6. Live Website │ │ 5. Push Files │ │ │ |
| 18 | +│ │ │ │ │ │ |
| 19 | +└─────────────────┘ └──────────────────┘ └─────────────────┘ |
| 20 | +``` |
| 21 | + |
| 22 | +## 🔄 Detailed Process |
| 23 | + |
| 24 | +### 1. Development Phase |
| 25 | +- Developer membuat perubahan di branch `main` |
| 26 | +- Test lokal menggunakan `pnpm dev` |
| 27 | +- Commit dan push perubahan ke repository |
| 28 | + |
| 29 | +### 2. Deployment Phase |
| 30 | +- Jalankan script deploy manual: `./scripts/deploy-manual.sh` |
| 31 | +- Script akan: |
| 32 | + - Pull latest changes dari main |
| 33 | + - Install dependencies dengan pnpm |
| 34 | + - Build project dengan Astro |
| 35 | + - Switch ke branch gh-pages |
| 36 | + - Copy built files ke root |
| 37 | + - Commit dan push ke gh-pages branch |
| 38 | + |
| 39 | +### 3. GitHub Pages Deployment |
| 40 | +- GitHub Pages otomatis detect perubahan di branch gh-pages |
| 41 | +- Website di-deploy ke https://www.konxc.space |
| 42 | +- Proses ini membutuhkan waktu 2-5 menit |
| 43 | + |
| 44 | +## 🎯 Key Benefits |
| 45 | + |
| 46 | +1. **No Billing Issues**: Tidak menggunakan GitHub Actions |
| 47 | +2. **Manual Control**: Developer memiliki kontrol penuh atas deployment |
| 48 | +3. **Reliable**: Script yang sederhana dan dapat diandalkan |
| 49 | +4. **Cross-Platform**: Support Linux, macOS, dan Windows |
| 50 | +5. **Documentation**: Dokumentasi lengkap untuk tim |
| 51 | + |
| 52 | +## ⚠️ Important Notes |
| 53 | + |
| 54 | +- **Branch Separation**: Main untuk development, gh-pages untuk deployment |
| 55 | +- **Manual Process**: Deployment harus dilakukan secara manual |
| 56 | +- **Script Dependency**: Pastikan pnpm dan Node.js terinstall |
| 57 | +- **Timing**: GitHub Pages butuh waktu untuk update |
| 58 | + |
| 59 | +## 🛠️ Maintenance |
| 60 | + |
| 61 | +- Script dapat diupdate sesuai kebutuhan |
| 62 | +- Dokumentasi harus selalu up-to-date |
| 63 | +- Tim harus familiar dengan proses manual deployment |
| 64 | +- Backup penting dilakukan secara teratur |
0 commit comments