Skip to content

Commit e633094

Browse files
authored
Merge pull request #7 from DesterLib/chore/simplify-workflow-to-main-only
chore:simplify workflow to main only
2 parents 56190ff + 5ae516f commit e633094

5 files changed

Lines changed: 68 additions & 52 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
1-
name: Deploy Documentation
1+
name: Deploy Docs to GitHub Pages
22

33
on:
4+
# Runs on pushes targeting the default branch
45
push:
5-
branches: [main]
6+
branches: ["main"]
67
paths:
78
- 'apps/docs/**'
89
- '.github/workflows/deploy-docs.yml'
10+
11+
# Allows you to run this workflow manually from the Actions tab
912
workflow_dispatch:
1013

14+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1115
permissions:
1216
contents: read
1317
pages: write
1418
id-token: write
1519

20+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
1622
concurrency:
1723
group: "pages"
1824
cancel-in-progress: false
@@ -27,29 +33,27 @@ jobs:
2733
- name: Setup pnpm
2834
uses: pnpm/action-setup@v4
2935
with:
30-
version: 9
36+
version: 9.0.0
3137

3238
- name: Setup Node
3339
uses: actions/setup-node@v4
3440
with:
35-
node-version: 18
36-
cache: 'pnpm'
41+
node-version: "18"
42+
cache: "pnpm"
3743

3844
- name: Setup Pages
3945
uses: actions/configure-pages@v4
4046

4147
- name: Install dependencies
4248
run: pnpm install --frozen-lockfile
4349

44-
- name: Build docs
45-
run: |
46-
cd apps/docs
47-
pnpm build
50+
- name: Build with Turbo
51+
run: pnpm turbo build --filter=docs
4852

4953
- name: Upload artifact
5054
uses: actions/upload-pages-artifact@v3
5155
with:
52-
path: apps/docs/dist
56+
path: ./apps/docs/dist
5357

5458
deploy:
5559
environment:
@@ -61,4 +65,3 @@ jobs:
6165
- name: Deploy to GitHub Pages
6266
id: deployment
6367
uses: actions/deploy-pages@v4
64-

apps/docs/src/content/docs/development/contributing.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ New to DesterLib? Here's the fastest way to start contributing:
2828
6. **Push** to your fork and create a **Pull Request**
2929

3030
:::tip[First Time Contributing?]
31-
Check out our [CONTRIBUTING.md](https://github.com/DesterLib/desterlib/blob/dev/CONTRIBUTING.md) for detailed step-by-step instructions!
31+
Check out our [CONTRIBUTING.md](https://github.com/DesterLib/desterlib/blob/main/CONTRIBUTING.md) for detailed step-by-step instructions!
3232
:::
3333

3434
## 🚀 For Community Contributors
@@ -52,16 +52,16 @@ Before starting new work, always sync:
5252

5353
```bash
5454
git fetch upstream
55-
git checkout dev
56-
git merge upstream/dev
57-
git push origin dev
55+
git checkout main
56+
git merge upstream/main
57+
git push origin main
5858
```
5959

6060
### 3. Create Feature Branch
6161

6262
```bash
63-
# Create branch from dev
64-
git checkout dev
63+
# Create branch from main
64+
git checkout main
6565
git checkout -b feat/your-feature-name
6666
```
6767

@@ -97,7 +97,7 @@ git push origin feat/your-feature-name
9797
2. Click "Pull requests" → "New pull request"
9898
3. Click "compare across forks"
9999
4. Select:
100-
- **base:** `DesterLib/desterlib` / `dev`
100+
- **base:** `DesterLib/desterlib` / `main`
101101
- **head:** `YOUR-USERNAME/desterlib` / `feat/your-feature-name`
102102
5. Fill out the PR template
103103
6. Submit!
@@ -113,9 +113,9 @@ If you have write access to the repository:
113113
git clone https://github.com/DesterLib/desterlib.git
114114
cd desterlib
115115

116-
# Create feature branch from dev
117-
git checkout dev
118-
git pull origin dev
116+
# Create feature branch from main
117+
git checkout main
118+
git pull origin main
119119
git checkout -b feat/your-feature-name
120120

121121
# Make changes, commit, add changeset
@@ -125,9 +125,14 @@ pnpm changeset
125125
# Push to origin
126126
git push -u origin feat/your-feature-name
127127

128-
# Create PR to dev
128+
# Create PR using script (targets main by default)
129+
pnpm pr:create
129130
```
130131

132+
:::note[Alpha Development]
133+
During alpha development, we use a simplified workflow: **Feature Branches → Main**. Once we reach stable releases, we'll introduce a `dev` branch for staging.
134+
:::
135+
131136
See the [Versioning Guide](/development/versioning/) for complete workflow.
132137

133138
## 🔍 Finding Issues to Work On
@@ -208,7 +213,7 @@ Before submitting your PR, verify:
208213
- [ ] Documentation updated (if needed)
209214
- [ ] PR template filled out completely
210215
- [ ] Tests pass (when available)
211-
- [ ] No merge conflicts with `dev`
216+
- [ ] No merge conflicts with `main`
212217

213218
## 📝 Commit Message Format
214219

@@ -307,18 +312,19 @@ git push origin feat/your-feature-name
307312
### 4. Merge
308313

309314
Once approved:
310-
- Maintainer merges to `dev`
315+
- Maintainer merges to `main`
311316
- Your contribution is part of DesterLib!
317+
- Docs automatically deploy to GitHub Pages
312318
- Celebrate! 🎉
313319

314320
## 🌟 After Your PR is Merged
315321

316322
### Update Your Fork
317323

318324
```bash
319-
git checkout dev
320-
git pull upstream dev
321-
git push origin dev
325+
git checkout main
326+
git pull upstream main
327+
git push origin main
322328
```
323329

324330
### Clean Up
@@ -344,7 +350,7 @@ Need assistance?
344350

345351
- 💭 [GitHub Discussions](https://github.com/DesterLib/desterlib/discussions) - Ask questions
346352
- 🐛 [GitHub Issues](https://github.com/DesterLib/desterlib/issues) - Report bugs
347-
- 📖 [Full Contributing Guide](https://github.com/DesterLib/desterlib/blob/dev/CONTRIBUTING.md) - Detailed instructions
353+
- 📖 [Full Contributing Guide](https://github.com/DesterLib/desterlib/blob/main/CONTRIBUTING.md) - Detailed instructions
348354

349355
## 🎉 Recognition
350356

apps/docs/src/content/docs/development/quick-reference.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ pnpm release
6666
## Changeset Flow
6767

6868
```
69-
Make Changes → Create Changeset → Commit & Push → Create PR to dev
70-
→ Review & Merge → Version Bump → Merge to main → Auto Release
69+
Make Changes → Create Changeset → Commit & Push → Create PR to main
70+
→ Review & Merge → Auto Deploy (docs) → Version Bump → Release
7171
```
7272

7373
## Example Changeset File
@@ -103,9 +103,9 @@ BREAKING CHANGE: Replace /auth/login with OAuth2
103103

104104
## PR Workflow
105105

106-
1. **Create feature branch from `dev`**
106+
1. **Create feature branch from `main`**
107107
```bash
108-
git checkout dev && git pull
108+
git checkout main && git pull
109109
git checkout -b feat/my-feature
110110
```
111111

@@ -127,9 +127,10 @@ BREAKING CHANGE: Replace /auth/login with OAuth2
127127
git push -u origin feat/my-feature
128128
```
129129

130-
5. **After merge to dev → version bump**
130+
5. **After merge to main**
131131
```bash
132-
pnpm version
132+
# Docs auto-deploy via GitHub Actions
133+
# Version bump via automated PR when ready
133134
git commit -am "chore: version packages"
134135
```
135136

apps/docs/src/content/docs/development/versioning.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,23 @@ Each significant change should have an associated changeset file that describes
4949

5050
## Branching Strategy
5151

52-
- **main** - Production-ready code, tagged releases
53-
- **dev** - Development branch, all features merge here first
54-
- **feat/** - Feature branches created from `dev`
55-
- **fix/** - Bug fix branches created from `dev`
56-
- **chore/** - Maintenance branches created from `dev`
52+
:::note[Alpha Development Workflow]
53+
During alpha development, we use a simplified workflow. Once we reach stable releases (v1.0.0), we'll introduce a `dev` branch for staging.
54+
:::
55+
56+
- **main** - Production code, auto-deploys docs, tagged releases
57+
- **feat/** - Feature branches created from `main`
58+
- **fix/** - Bug fix branches created from `main`
59+
- **chore/** - Maintenance branches created from `main`
60+
- **docs/** - Documentation branches created from `main`
5761

5862
## Making Changes
5963

6064
### 1. Create a feature branch
6165

6266
```bash
63-
git checkout dev
64-
git pull origin dev
67+
git checkout main
68+
git pull origin main
6569
git checkout -b feat/your-feature-name
6670
```
6771

@@ -213,8 +217,10 @@ git push
213217

214218
1. Merge to main:
215219
```bash
216-
git checkout main
217-
git merge dev
220+
# Not needed in alpha - PRs merge directly to main
221+
# In the future with dev branch:
222+
# git checkout main
223+
# git merge dev
218224
```
219225

220226
2. Build and publish:
@@ -244,8 +250,8 @@ GitHub Actions automatically handles releases:
244250

245251
```bash
246252
# 1. Create feature branch
247-
git checkout dev
248-
git pull origin dev
253+
git checkout main
254+
git pull origin main
249255
git checkout -b feat/add-user-search
250256

251257
# 2. Make changes
@@ -276,8 +282,8 @@ git push -u origin feat/add-user-search
276282

277283
```bash
278284
# 1. Create fix branch
279-
git checkout dev
280-
git pull origin dev
285+
git checkout main
286+
git pull origin main
281287
git checkout -b fix/authentication-error
282288

283289
# 2. Fix the bug
@@ -308,7 +314,7 @@ git push -u origin fix/authentication-error
308314

309315
```bash
310316
# 1. Create feature branch
311-
git checkout dev
317+
git checkout main
312318
git checkout -b feat/api-v2-breaking
313319

314320
# 2. Make breaking changes

scripts/create-pr.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
set -e
77

8-
# Default target branch is dev
9-
TARGET_BRANCH="${1:-dev}"
8+
# Default target branch is main
9+
TARGET_BRANCH="${1:-main}"
1010

1111
# Get current branch
1212
CURRENT_BRANCH=$(git branch --show-current)
@@ -19,8 +19,8 @@ if ! command -v gh &> /dev/null; then
1919
fi
2020

2121
# Check if we're on a branch
22-
if [ "$CURRENT_BRANCH" == "main" ] || [ "$CURRENT_BRANCH" == "dev" ]; then
23-
echo "❌ Cannot create PR from main or dev branch"
22+
if [ "$CURRENT_BRANCH" == "main" ]; then
23+
echo "❌ Cannot create PR from main branch"
2424
echo "Please switch to a feature branch"
2525
exit 1
2626
fi

0 commit comments

Comments
 (0)