@@ -31,23 +31,10 @@ 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 }}/bun.lock" ]; then
38- echo "manager=bun" >> $GITHUB_OUTPUT
39- echo "command=install" >> $GITHUB_OUTPUT
40- echo "runner=bun" >> $GITHUB_OUTPUT
41- exit 0
42- else
43- echo "Unable to determine package manager"
44- exit 1
45- fi
46- - name : Setup Node
47- uses : actions/setup-node@v4
34+ - name : Setup Bun
35+ uses : oven-sh/setup-bun@v2
4836 with :
49- node-version : " 20"
50- cache : ${{ steps.detect-package-manager.outputs.manager }}
37+ bun-version : " 1.1.38"
5138 - name : Setup Pages
5239 uses : actions/configure-pages@v5
5340 with :
@@ -62,14 +49,14 @@ jobs:
6249 path : |
6350 .next/cache
6451 # Generate a new cache whenever packages or source files change.
65- key : ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/ bun.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
52+ key : ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
6653 # If source files changed but packages didn't, rebuild from a prior cache.
6754 restore-keys : |
68- ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/ bun.lock') }}-
55+ ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lock') }}-
6956 - name : Install dependencies
70- run : ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
57+ run : bun install
7158 - name : Build with Next.js
72- run : ${{ steps.detect-package-manager.outputs.runner }} next build
59+ run : bun run build
7360 - name : Upload artifact
7461 uses : actions/upload-pages-artifact@v3
7562 with :
0 commit comments