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
22 changes: 14 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
name: Deploy to Vercel

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
environment:
description: 'Deploy environment'
required: true
default: 'production'
type: choice
options:
- production
- preview

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
Expand All @@ -31,10 +37,10 @@ jobs:
- name: Build
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Preview (PR)
if: github.event_name == 'pull_request'
- name: Deploy Preview
if: ${{ inputs.environment == 'preview' }}
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Production (main)
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
- name: Deploy Production
if: ${{ inputs.environment == 'production' }}
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit $1
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
.next
out
build
dist
coverage
.vercel
*.min.js
package-lock.json
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 100,
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf"
}
26 changes: 23 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,37 @@ Before submitting a bug report:
```
3. Make your changes following our coding standards
4. Write or update tests if applicable
5. Run linting and type checking:
5. Run linting, formatting, and type checking:
```bash
npm run lint
npm run format
npm run type-check
```
6. Commit with clear, descriptive messages
6. Commit with conventional commit messages (pre-commit hooks will lint and format)
7. Push and open a pull request

### Commit Messages

Use clear, descriptive commit messages:
We use [Conventional Commits](https://www.conventionalcommits.org/). Commits are validated by commitlint.

**Format:** `type: description`

**Types:**
| Type | Description |
|------|-------------|
| `feat` | New feature |
| `fix` | Bug fix |
| `docs` | Documentation only |
| `style` | Formatting, no code change |
| `refactor` | Code change without fix or feature |
| `perf` | Performance improvement |
| `test` | Adding tests |
| `chore` | Maintenance |
| `ci` | CI/CD changes |
| `build` | Build system changes |
| `revert` | Revert previous commit |

**Examples:**

- `feat: add user profile page`
- `fix: resolve wallet connection issue on mobile`
Expand Down
Loading