next-netlify-github-actions-starter

A starter project for Next.js, Netlify and Github Actions

Stars
6

Next + Netlify + Github Actions Starter

This is a Next.js project bootstrapped with create-next-app and set up to be deployed on Netlify using Github Actions.

This template is related to the article: How to deploy your Next.js app on Netlify using Github Actions

Quick start

Install the dependencies

npm install

Check your project is working properly launching the dev mode:

npm run dev

A new tab should automatically open in your browser.

If not, go to http://localhost:3000 with your browser to see the result.

Environment variables

Go to your Github project settings and setup the following environment variables.

Actions secret name Comments
NETLIFY_AUTH_TOKEN Request your token here
NETLIFY_SITE_ID The site to where deploy your site (get it from the API ID on your Site Settings)

Open a pull request

The current Github Action only works when you open a new PR to main / master. Feel free to change to push instead of pull_request if you want to trigger on push.

Deploy in one-click

You can use this button below to create a new repo with the current project and automatically deploy to Netlify.

Badges
Extracted from project README
Netlify Status Deploy to Netlify