Skip to content

Commit 2bc1457

Browse files
committed
Refactor GitHub Actions deployment workflow to use Bun
- Changed the runner to 'ubuntu-latest' for improved compatibility. - Replaced Node.js setup with Bun setup for dependency management. - Updated cache key to utilize 'bun.lockb' instead of 'package-lock.json'. - Modified installation commands to use 'bun install' and 'bun add' for Vercel CLI. - Enhanced overall workflow efficiency and streamlined dependency handling.
1 parent 0d72568 commit 2bc1457

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,33 @@ concurrency:
1414

1515
jobs:
1616
build:
17-
runs-on: blacksmith-8vcpu-ubuntu-2204
17+
runs-on: ubuntu-latest
1818
env:
1919
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
2020
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
2121
steps:
2222
- name: Checkout
2323
uses: actions/checkout@v4
2424

25-
- name: Setup node
26-
uses: useblacksmith/setup-node@v5
25+
- name: Setup Bun
26+
uses: oven-sh/setup-bun@v1
2727
with:
28-
node-version: 20
29-
cache: 'npm'
28+
bun-version: latest
3029

3130
- name: Restore cache
32-
uses: useblacksmith/cache@v5
31+
uses: actions/cache@v4
3332
with:
3433
path: |
3534
.next/cache
36-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
35+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
3736
restore-keys: |
38-
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
37+
${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}-
3938
4039
- name: Install dependencies
41-
run: npm install --force
40+
run: bun install
4241

4342
- name: Install Vercel CLI
44-
run: npm install -g vercel@latest --force
43+
run: bun add -g vercel@latest
4544

4645
- name: Pull Vercel environment variables
4746
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}

0 commit comments

Comments
 (0)