Skip to content

Commit c4943e5

Browse files
jofftiquezclaude
andcommitted
Switch to pnpm and enable auto-deployment
Update project infrastructure and CI/CD configuration: - Switch package manager from npm to pnpm for better performance - Simplify GitHub Actions workflow with direct pnpm setup - Enable automatic deployment on push to main branch - Update cache keys to use pnpm-lock.yaml - Update README with pnpm commands - Add Claude.local.md to .gitignore for local AI configs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent cd7bf05 commit c4943e5

File tree

5 files changed

+1047
-1754
lines changed

5 files changed

+1047
-1754
lines changed

.github/workflows/nextjs.yml

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ name: Deploy Next.js site to Pages
66

77
on:
88
# Runs on pushes targeting the default branch
9-
# push:
10-
# branches: ["main"]
9+
push:
10+
branches: ["main"]
1111

1212
# Allows you to run this workflow manually from the Actions tab
1313
workflow_dispatch:
@@ -31,28 +31,15 @@ jobs:
3131
steps:
3232
- name: Checkout
3333
uses: actions/checkout@v4
34-
- name: Detect package manager
35-
id: detect-package-manager
36-
run: |
37-
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
38-
echo "manager=yarn" >> $GITHUB_OUTPUT
39-
echo "command=install" >> $GITHUB_OUTPUT
40-
echo "runner=yarn" >> $GITHUB_OUTPUT
41-
exit 0
42-
elif [ -f "${{ github.workspace }}/package.json" ]; then
43-
echo "manager=npm" >> $GITHUB_OUTPUT
44-
echo "command=ci" >> $GITHUB_OUTPUT
45-
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
46-
exit 0
47-
else
48-
echo "Unable to determine package manager"
49-
exit 1
50-
fi
34+
- name: Setup pnpm
35+
uses: pnpm/action-setup@v4
36+
with:
37+
version: 9
5138
- name: Setup Node
5239
uses: actions/setup-node@v4
5340
with:
5441
node-version: "20"
55-
cache: ${{ steps.detect-package-manager.outputs.manager }}
42+
cache: "pnpm"
5643
- name: Setup Pages
5744
uses: actions/configure-pages@v5
5845
with:
@@ -67,14 +54,14 @@ jobs:
6754
path: |
6855
.next/cache
6956
# Generate a new cache whenever packages or source files change.
70-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
57+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
7158
# If source files changed but packages didn't, rebuild from a prior cache.
7259
restore-keys: |
73-
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
60+
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
7461
- name: Install dependencies
75-
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
62+
run: pnpm install --frozen-lockfile
7663
- name: Build with Next.js
77-
run: ${{ steps.detect-package-manager.outputs.runner }} next build
64+
run: pnpm next build
7865
- name: Upload artifact
7966
uses: actions/upload-pages-artifact@v3
8067
with:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ yarn-error.log*
3939
# typescript
4040
*.tsbuildinfo
4141
next-env.d.ts
42+
43+
# AI
44+
Claude.local.md

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@ Website for LGTM Podcast by OSSPH - A tech podcast featuring discussions about s
2525

2626
### Prerequisites
2727

28-
- Node.js 18+
29-
- npm or pnpm
28+
- Node.js 18+
29+
- pnpm
3030

3131
### Installation
3232

3333
```bash
3434
# Install dependencies
35-
npm install
35+
pnpm install
3636

3737
# Run development server
38-
npm run dev
38+
pnpm dev
3939

4040
# Build for production
41-
npm run build
41+
pnpm build
4242

4343
# Start production server
44-
npm start
44+
pnpm start
4545
```
4646

4747
Open [http://localhost:3000](http://localhost:3000) to view the website.

0 commit comments

Comments
 (0)