Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
name: Deploy Documentation
name: Deploy Docs to GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: [main]
branches: ["main"]
paths:
- 'apps/docs/**'
- '.github/workflows/deploy-docs.yml'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

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

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
node-version: "18"
cache: "pnpm"

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

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build docs
run: |
cd apps/docs
pnpm build
- name: Build with Turbo
run: pnpm turbo build --filter=docs

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: apps/docs/dist
path: ./apps/docs/dist

deploy:
environment:
Expand All @@ -61,4 +65,3 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

40 changes: 23 additions & 17 deletions apps/docs/src/content/docs/development/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ New to DesterLib? Here's the fastest way to start contributing:
6. **Push** to your fork and create a **Pull Request**

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

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

```bash
git fetch upstream
git checkout dev
git merge upstream/dev
git push origin dev
git checkout main
git merge upstream/main
git push origin main
```

### 3. Create Feature Branch

```bash
# Create branch from dev
git checkout dev
# Create branch from main
git checkout main
git checkout -b feat/your-feature-name
```

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

# Create feature branch from dev
git checkout dev
git pull origin dev
# Create feature branch from main
git checkout main
git pull origin main
git checkout -b feat/your-feature-name

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

# Create PR to dev
# Create PR using script (targets main by default)
pnpm pr:create
```

:::note[Alpha Development]
During alpha development, we use a simplified workflow: **Feature Branches → Main**. Once we reach stable releases, we'll introduce a `dev` branch for staging.
:::

See the [Versioning Guide](/development/versioning/) for complete workflow.

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

## 📝 Commit Message Format

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

Once approved:
- Maintainer merges to `dev`
- Maintainer merges to `main`
- Your contribution is part of DesterLib!
- Docs automatically deploy to GitHub Pages
- Celebrate! 🎉

## 🌟 After Your PR is Merged

### Update Your Fork

```bash
git checkout dev
git pull upstream dev
git push origin dev
git checkout main
git pull upstream main
git push origin main
```

### Clean Up
Expand All @@ -344,7 +350,7 @@ Need assistance?

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

## 🎉 Recognition

Expand Down
13 changes: 7 additions & 6 deletions apps/docs/src/content/docs/development/quick-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ pnpm release
## Changeset Flow

```
Make Changes → Create Changeset → Commit & Push → Create PR to dev
→ Review & Merge → Version Bump → Merge to main → Auto Release
Make Changes → Create Changeset → Commit & Push → Create PR to main
→ Review & Merge → Auto Deploy (docs) → Version Bump → Release
```

## Example Changeset File
Expand Down Expand Up @@ -103,9 +103,9 @@ BREAKING CHANGE: Replace /auth/login with OAuth2

## PR Workflow

1. **Create feature branch from `dev`**
1. **Create feature branch from `main`**
```bash
git checkout dev && git pull
git checkout main && git pull
git checkout -b feat/my-feature
```

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

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

Expand Down
34 changes: 20 additions & 14 deletions apps/docs/src/content/docs/development/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,23 @@ Each significant change should have an associated changeset file that describes

## Branching Strategy

- **main** - Production-ready code, tagged releases
- **dev** - Development branch, all features merge here first
- **feat/** - Feature branches created from `dev`
- **fix/** - Bug fix branches created from `dev`
- **chore/** - Maintenance branches created from `dev`
:::note[Alpha Development Workflow]
During alpha development, we use a simplified workflow. Once we reach stable releases (v1.0.0), we'll introduce a `dev` branch for staging.
:::

- **main** - Production code, auto-deploys docs, tagged releases
- **feat/** - Feature branches created from `main`
- **fix/** - Bug fix branches created from `main`
- **chore/** - Maintenance branches created from `main`
- **docs/** - Documentation branches created from `main`

## Making Changes

### 1. Create a feature branch

```bash
git checkout dev
git pull origin dev
git checkout main
git pull origin main
git checkout -b feat/your-feature-name
```

Expand Down Expand Up @@ -213,8 +217,10 @@ git push

1. Merge to main:
```bash
git checkout main
git merge dev
# Not needed in alpha - PRs merge directly to main
# In the future with dev branch:
# git checkout main
# git merge dev
```

2. Build and publish:
Expand Down Expand Up @@ -244,8 +250,8 @@ GitHub Actions automatically handles releases:

```bash
# 1. Create feature branch
git checkout dev
git pull origin dev
git checkout main
git pull origin main
git checkout -b feat/add-user-search

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

```bash
# 1. Create fix branch
git checkout dev
git pull origin dev
git checkout main
git pull origin main
git checkout -b fix/authentication-error

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

```bash
# 1. Create feature branch
git checkout dev
git checkout main
git checkout -b feat/api-v2-breaking

# 2. Make breaking changes
Expand Down
8 changes: 4 additions & 4 deletions scripts/create-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

set -e

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

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

# Check if we're on a branch
if [ "$CURRENT_BRANCH" == "main" ] || [ "$CURRENT_BRANCH" == "dev" ]; then
echo "❌ Cannot create PR from main or dev branch"
if [ "$CURRENT_BRANCH" == "main" ]; then
echo "❌ Cannot create PR from main branch"
echo "Please switch to a feature branch"
exit 1
fi
Expand Down