Skip to content

Commit

Permalink
Create nextjs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
p-shubh authored Jun 16, 2024
1 parent 630e0f3 commit 3d8dd3a
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Sample workflow for building and deploying a Next.js site to GitHub Pages
#
# To get started with Next.js see: https://nextjs.org/docs/getting-started
#
name: Next.js CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x] # Specify the Node.js versions to test against

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install

- name: Build Next.js app
run: npm run build

- name: Run tests
run: npm test

- name: Upload production-ready build artifacts
if: success()
uses: actions/upload-artifact@v2
with:
name: nextjs-build
path: .next

0 comments on commit 3d8dd3a

Please sign in to comment.