Skip to content

Commit 56d828c

Browse files
committed
Add Next.js build and artifact upload to workflow
Introduces steps to build the Next.js project and upload the build output as an artifact in the GitHub Actions workflow. This prepares the project for deployment and enables integration with GitHub Pages or other artifact consumers.
1 parent fe2e3ee commit 56d828c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/nextjs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ jobs:
7878
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
7979
- name: Install dependencies
8080
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
81+
- name: Build with Next.js
82+
run: ${{ steps.detect-package-manager.outputs.runner }} next build
83+
- name: Upload artifact
84+
uses: actions/upload-pages-artifact@v3
85+
with:
86+
path: ./out
8187

8288
# Deployment job
8389
deploy:

0 commit comments

Comments
 (0)