mirror of
https://github.com/ghndrx/k8s-game-2048.git
synced 2026-02-10 06:45:07 +00:00
feat: update workflows for develop/staging/master branch structure
This commit is contained in:
2
.github/workflows/deploy-prod.yml
vendored
2
.github/workflows/deploy-prod.yml
vendored
@@ -1,6 +1,8 @@
|
|||||||
name: Deploy to Production
|
name: Deploy to Production
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|||||||
2
.github/workflows/deploy-staging.yml
vendored
2
.github/workflows/deploy-staging.yml
vendored
@@ -2,7 +2,7 @@ name: Deploy to Staging
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ staging ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -29,15 +29,17 @@ Thank you for considering contributing to this project! This guide will help you
|
|||||||
|
|
||||||
We use a GitFlow-inspired workflow:
|
We use a GitFlow-inspired workflow:
|
||||||
|
|
||||||
- **`main`** - Production-ready code, deployed to staging automatically
|
- **`master`** - Production-ready code, deployed to production automatically
|
||||||
|
- **`staging`** - Staging branch, deployed to staging environment automatically
|
||||||
- **`develop`** - Development branch, deployed to dev environment automatically
|
- **`develop`** - Development branch, deployed to dev environment automatically
|
||||||
- **`feature/*`** - Feature branches, create PR to develop
|
- **`feature/*`** - Feature branches, create PR to develop
|
||||||
- **`hotfix/*`** - Hotfix branches, create PR to main
|
- **`hotfix/*`** - Hotfix branches, create PR to master
|
||||||
- **`release/*`** - Release branches for production deployment
|
- **`release/*`** - Release branches for production deployment
|
||||||
|
|
||||||
### Branch Protection Rules
|
### Branch Protection Rules
|
||||||
|
|
||||||
- **`main`**: Requires PR review, all checks must pass
|
- **`master`**: Requires PR review, all checks must pass
|
||||||
|
- **`staging`**: Requires PR review, all checks must pass
|
||||||
- **`develop`**: Requires PR review, all checks must pass
|
- **`develop`**: Requires PR review, all checks must pass
|
||||||
|
|
||||||
## Deployment Environments
|
## Deployment Environments
|
||||||
@@ -45,8 +47,8 @@ We use a GitFlow-inspired workflow:
|
|||||||
| Environment | Branch | Domain | Auto-Deploy |
|
| Environment | Branch | Domain | Auto-Deploy |
|
||||||
|-------------|--------|---------|------------|
|
|-------------|--------|---------|------------|
|
||||||
| Development | `develop` | `2048-dev.wa.darknex.us` | ✅ |
|
| Development | `develop` | `2048-dev.wa.darknex.us` | ✅ |
|
||||||
| Staging | `main` | `2048-staging.wa.darknex.us` | ✅ |
|
| Staging | `staging` | `2048-staging.wa.darknex.us` | ✅ |
|
||||||
| Production | `tags` | `2048.wa.darknex.us` | Manual |
|
| Production | `master` | `2048.wa.darknex.us` | ✅ |
|
||||||
|
|
||||||
## Making Changes
|
## Making Changes
|
||||||
|
|
||||||
@@ -72,14 +74,14 @@ We use a GitFlow-inspired workflow:
|
|||||||
|
|
||||||
### For Bug Fixes
|
### For Bug Fixes
|
||||||
|
|
||||||
1. Create a hotfix branch from `main`:
|
1. Create a hotfix branch from `master`:
|
||||||
```bash
|
```bash
|
||||||
git checkout main
|
git checkout master
|
||||||
git pull origin main
|
git pull origin master
|
||||||
git checkout -b hotfix/fix-description
|
git checkout -b hotfix/fix-description
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Make your changes and create PR to `main`
|
2. Make your changes and create PR to `master`
|
||||||
|
|
||||||
## Commit Convention
|
## Commit Convention
|
||||||
|
|
||||||
@@ -133,16 +135,16 @@ curl -f https://2048-dev.wa.darknex.us/
|
|||||||
|
|
||||||
## Release Process
|
## Release Process
|
||||||
|
|
||||||
1. Create a release branch from `main`:
|
1. Create a release branch from `master`:
|
||||||
```bash
|
```bash
|
||||||
git checkout main
|
git checkout master
|
||||||
git pull origin main
|
git pull origin master
|
||||||
git checkout -b release/v1.1.0
|
git checkout -b release/v1.1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Update version in `package.json`
|
2. Update version in `package.json`
|
||||||
|
|
||||||
3. Create PR to `main`
|
3. Create PR to `master`
|
||||||
|
|
||||||
4. After merge, create a GitHub release with tag
|
4. After merge, create a GitHub release with tag
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user