Skip to content

Commit ac8695b

Browse files
committed
fix: bun binaries not found
1 parent c7960a9 commit ac8695b

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/deploy.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy Next.js App to Server
1+
name: Deploy Next.js App with Bun
22

33
on:
44
push:
@@ -12,16 +12,24 @@ jobs:
1212
- name: Checkout code
1313
uses: actions/checkout@v4
1414

15-
- name: Set up Node.js
16-
uses: actions/setup-node@v4
17-
with:
18-
node-version: '20'
15+
- name: Install Bun
16+
run: |
17+
curl -fsSL https://bun.sh/install | bash
18+
export BUN_INSTALL="$HOME/.bun"
19+
export PATH="$BUN_INSTALL/bin:$PATH"
20+
bun --version
1921
2022
- name: Install dependencies
21-
run: npm install --force
23+
run: |
24+
export BUN_INSTALL="$HOME/.bun"
25+
export PATH="$BUN_INSTALL/bin:$PATH"
26+
bun install
2227
2328
- name: Build Next.js app
24-
run: npm run build
29+
run: |
30+
export BUN_INSTALL="$HOME/.bun"
31+
export PATH="$BUN_INSTALL/bin:$PATH"
32+
bun run build
2533
2634
- name: Deploy to server
2735
uses: appleboy/ssh-action@v1.0.3
@@ -33,6 +41,6 @@ jobs:
3341
script: |
3442
cd ${{ secrets.APP_PATH }}
3543
git pull origin master
36-
npm install --force
37-
npm run build
44+
bun install
45+
bun run build
3846
pm2 restart airankia

0 commit comments

Comments
 (0)