Skip to content

Commit 2ace780

Browse files
committed
refactor: streamline GitHub Actions workflow by removing cache steps and using pnpm for dependency installation
1 parent 0dd38e8 commit 2ace780

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

.github/workflows/publish.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,26 @@ jobs:
2525
name: Build for GitHub Pages
2626
steps:
2727
- uses: actions/checkout@v3
28+
29+
- name: Setup pnpm
30+
uses: pnpm/action-setup@v4
31+
with:
32+
version: 8
33+
2834
- name: Setup node
2935
uses: actions/setup-node@v3
3036
with:
3137
node-version: ^21.7.3
38+
cache: 'pnpm'
3239

3340
- name: Setup Pages
3441
uses: actions/configure-pages@v5
3542

36-
- name: Restore cache
37-
uses: actions/cache@v4
38-
with:
39-
path: |
40-
.next/cache
41-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
42-
restore-keys: |
43-
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
44-
45-
- run: npm install
46-
- run: npm run build
43+
- name: Install dependencies
44+
run: pnpm install --frozen-lockfile
45+
46+
- name: Build with Next.js
47+
run: pnpm run build
4748

4849
- name: Upload artifact
4950
uses: actions/upload-pages-artifact@v3

0 commit comments

Comments
 (0)