Deploy Nextjs app to github-pages with Github Actions

deploy-nextjs-app-to-github-pages-with-github-actions

Github made super easy to deploy nextjs app to github pages using Github Actions.

First let’s create a nextjs app: npx create-next-app@latest. Follow all the steps to setup a new nextjs app.
Then go to github.com and create a new repository. I named my nextjs-my-app, you can name it whatever you want. Follow the steps to push an existing repository from the command line.
Now go the repository settings:

  1. Go to Settings

Image description

  1. From left side navigation go to Pages

Image description

  1. On Build and deployment section for the source choose: Github Actions (beta)

Image description

  1. Nextjs config section will show up. Click on configure.

Image description

  1. Commit nextjs.yml auto generated file.

Image description

Image description

  1. In few seconds you will see that deployment is done.
  2. To see nextjs app live go to : https://[username].github.io/[repository-name]/ For me is: https://mentorkadriu.github.io/nextjs-my-app/
Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
how-to-improve-your-content-conversion-rate

How To Improve Your Content Conversion Rate

Next Post
connecting-product-roadmaps-to-business-value

Connecting Product Roadmaps to Business Value

Related Posts