Skip to content

Commit e883530

Browse files
committed
Update deploy workflow actions
1 parent 03926e5 commit e883530

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

.github/workflows/deploy-to-netlify.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,25 @@ jobs:
2121
NEXT_PUBLIC_MEASURING_ID: ${{ secrets.NEXT_PUBLIC_MEASURING_ID }}
2222
steps:
2323
- name: Checkout code
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v6
2525

2626
- name: Setup Node.js
27-
uses: actions/setup-node@v3
27+
uses: actions/setup-node@v6
2828
with:
29-
node-version: 20.x
29+
node-version: 22.x
30+
cache: npm
3031

3132
- name: Install dependencies
3233
run: npm ci
3334

35+
- name: Cache Next.js build
36+
uses: actions/cache@v5
37+
with:
38+
path: .next/cache
39+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}
40+
restore-keys: |
41+
${{ runner.os }}-nextjs-
42+
3443
- name: Build project
3544
run: npm run build
3645

@@ -43,10 +52,3 @@ jobs:
4352
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
4453
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
4554
NEXT_PUBLIC_NETLIFY: "true" # Optional but recommended
46-
47-
- name: Cache Next.js build
48-
uses: actions/cache@v3
49-
with:
50-
path: |
51-
.next/cache
52-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}

0 commit comments

Comments
 (0)