lily_website

๐ŸŒฟ Branching Strategy

docs/en_EN/infrastructure/devops/ ยท README โ†’ Branching


Branch Structure

main (production via tags)
โ””โ”€โ”€ develop (active work)
    โ”œโ”€โ”€ feature/user-auth
    โ”œโ”€โ”€ feature/payments
    โ””โ”€โ”€ fix/login-bug

Note: The release branch has been removed. Production releases now use git tags (e.g., v1.2.3).

See: Tag-Based Releases Guide


Flow

Daily Development

1. Create feature branch from develop:
   git checkout develop
   git checkout -b feature/my-feature

2. Work on feature, commit, push

3. Create PR: feature/my-feature โ†’ develop
   - CI Develop runs (lint)
   - Code review
   - Merge

Release Cycle (Tag-Based)

1. Create PR: develop โ†’ main
   - CI Main runs (full tests + docker build)
   - Code review
   - Merge

2. Create release tag:
   git checkout main
   git pull origin main
   git tag -a v1.2.3 -m "Release 1.2.3: Description"
   git push origin v1.2.3

3. GitHub Actions automatically:
   - Builds Docker images
   - Pushes to GHCR
   - Deploys to production VPS

Full guide: Releases via Tags


Branch Rules

Branch Direct Push PR Required CI Required Deployment
develop โœ… Yes Optional Lint on push No
main โŒ No โœ… Yes Tests must pass Via tags only

GitHub Branch Protection Setup

main branch:

develop branch:


Migration from Release Branch

The project previously used a release branch for production deployments. This has been replaced with tag-based releases for:

Migration guide: MIGRATION_TO_TAGS.md