Skip to content

Commit 5a82a59

Browse files
Waseem raja ShaikWaseem raja Shaik
Waseem raja Shaik
authored and
Waseem raja Shaik
committed
s
1 parent c3ca110 commit 5a82a59

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

.github/workflows/nextjs.yml

+9-12
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
steps:
3232
- name: Checkout
3333
uses: actions/checkout@v4
34+
3435
- name: Detect package manager
3536
id: detect-package-manager
3637
run: |
@@ -48,19 +49,16 @@ jobs:
4849
echo "Unable to determine package manager"
4950
exit 1
5051
fi
52+
5153
- name: Setup Node
5254
uses: actions/setup-node@v4
5355
with:
54-
node-version: "20"
56+
node-version: "lts/*"
5557
cache: ${{ steps.detect-package-manager.outputs.manager }}
58+
5659
- name: Setup Pages
5760
uses: actions/configure-pages@v4
58-
with:
59-
# Automatically inject basePath in your Next.js configuration file and disable
60-
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
61-
#
62-
# You may remove this line if you want to manage the configuration yourself.
63-
static_site_generator: next
61+
6462
- name: Restore cache
6563
uses: actions/cache@v4
6664
with:
@@ -71,14 +69,13 @@ jobs:
7169
# If source files changed but packages didn't, rebuild from a prior cache.
7270
restore-keys: |
7371
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
72+
7473
- name: Install dependencies
7574
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
75+
7676
- name: Build with Next.js
7777
run: ${{ steps.detect-package-manager.outputs.runner }} next build
78-
- name: Static HTML export with Next.js
79-
run: ${{ steps.detect-package-manager.outputs.runner }} run build
80-
- name: List directory contents
81-
run: ls -la
78+
8279
- name: Upload artifact
8380
uses: actions/upload-pages-artifact@v3
8481
with:
@@ -94,4 +91,4 @@ jobs:
9491
steps:
9592
- name: Deploy to GitHub Pages
9693
id: deployment
97-
uses: actions/deploy-pages@v4
94+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)