docs: add Git branching workflow to CLAUDE.md and DEPLOYMENT.md

- Document develop → staging, main → production workflow
- Add branch descriptions and commit conventions
- Include workflow steps with commands

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Martin Porwoll 2026-01-17 17:35:25 +00:00
parent d7dfa2e2ea
commit 847018cd60
2 changed files with 104 additions and 3 deletions

View file

@ -287,9 +287,70 @@ PGPASSWORD="$DB_PASSWORD" psql -h 10.10.181.101 -U payload -d payload_db
scripts/backup/setup-backup.sh # Backup-System einrichten
```
## Git Branching Workflow
**Wichtig:** Immer zuerst auf `develop` entwickeln, nach Freigabe mit `main` mergen.
```
develop ──────●────●────●────────●────── (Entwicklung)
\ /
main ────────●────────────●────────── (Production)
```
### Branches
| Branch | Zweck | Deployment |
|--------|-------|------------|
| `develop` | Aktive Entwicklung | Staging (pl.porwoll.tech) |
| `main` | Stabile Version | Production (cms.c2sgmbh.de) |
| `feature/*` | Feature-Branches | Lokal / PR nach develop |
### Entwicklungs-Workflow
1. **Auf develop arbeiten:**
```bash
git checkout develop
git pull origin develop
```
2. **Änderungen committen:**
```bash
git add .
git commit -m "feat/fix/docs: beschreibung"
git push origin develop
```
3. **Nach Freigabe: develop → main mergen:**
```bash
git checkout main
git pull origin main
git merge develop
git push origin main
```
4. **develop aktuell halten (falls main Hotfixes hat):**
```bash
git checkout develop
git merge main
git push origin develop
```
### Commit-Konventionen
| Prefix | Verwendung |
|--------|------------|
| `feat:` | Neue Features |
| `fix:` | Bug-Fixes |
| `docs:` | Dokumentation |
| `refactor:` | Code-Refactoring |
| `test:` | Tests |
| `chore:` | Maintenance |
---
## Workflow nach Code-Änderungen
1. Code ändern
1. Code ändern (auf `develop` Branch)
2. `pnpm build`
3. `pm2 restart payload`
4. Testen unter https://pl.porwoll.tech/admin
@ -1273,4 +1334,4 @@ ssh payload@162.55.85.18
### Scripts & Backup
- `scripts/backup/README.md` - Backup-System Dokumentation
*Letzte Aktualisierung: 17.01.2026*
*Letzte Aktualisierung: 17.01.2026 (Git Workflow hinzugefügt)*

View file

@ -1,6 +1,6 @@
# Deployment Guide - Payload CMS Multi-Tenant
*Letzte Aktualisierung: 27. Dezember 2025*
*Letzte Aktualisierung: 17. Januar 2026*
> **Wichtig:** Für die vollständige Deployment-Strategie siehe [DEPLOYMENT_STRATEGY.md](./DEPLOYMENT_STRATEGY.md)
@ -30,6 +30,46 @@ Dieses Dokument beschreibt den Deployment-Prozess für das Payload CMS Multi-Ten
---
## Git Branching Workflow
**Regel:** Immer auf `develop` entwickeln, nach Freigabe mit `main` mergen.
### Workflow
```bash
# 1. Auf develop entwickeln
git checkout develop
git pull origin develop
# ... Code ändern ...
git add .
git commit -m "feat: neue Funktion"
git push origin develop
# → Automatisches Deployment auf Staging (pl.porwoll.tech)
# 2. Nach Test & Freigabe: Merge in main
git checkout main
git pull origin main
git merge develop
git push origin main
# → Manuelles Deployment auf Production (cms.c2sgmbh.de)
# 3. develop aktuell halten (nach Hotfixes auf main)
git checkout develop
git merge main
git push origin develop
```
### Commit-Konventionen
| Prefix | Verwendung |
|--------|------------|
| `feat:` | Neue Features |
| `fix:` | Bug-Fixes |
| `docs:` | Dokumentation |
| `refactor:` | Code-Refactoring |
---
## Staging Deployment (Development → pl.porwoll.tech)
### Automatisch via GitHub Actions