Skip to content

Commit

Permalink
✨ Prettier check workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zachlagden committed Oct 19, 2024
1 parent 87c34eb commit 1a263e4
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18' # Use the Node.js version you are using for the Next.js project
node-version: '20' # Use the Node.js version you are using for the Next.js project

# Step 3: Install dependencies
- name: Install dependencies
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Prettier Check

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
prettier:
name: Run Prettier
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the code
- name: Checkout repository
uses: actions/checkout@v3

# Step 2: Set up Node.js (Make sure to use the version your project requires)
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20' # Specify your Node.js version

# Step 3: Install dependencies
- name: Install dependencies
run: npm install

# Step 4: Run Prettier
- name: Run Prettier
run: npm run format:check
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"format": "prettier --write ."
"format": "prettier --write .",
"format:check": "prettier --check ."
},
"dependencies": {
"@fortawesome/fontawesome-free": "^6.6.0",
Expand Down

0 comments on commit 1a263e4

Please sign in to comment.