How to deploy next js app to github page
Steps:
- Prepare your Next js app. Here I followd Next.js quick start to create a blog.
- Push the project to Github.
- Followed the steps by How to deploy a Nextjs app to GitHub pages
Issues:
- Build error: next export has been removed in favor of "output": "export"
- There's no next.config.js in the blog App I created, so I first added next.config.js.
- Resolved the build error by Github discussion.
Remain issues:
- The profile avatar is using the absolute url. Reletive path is not working.