Matt
Matt

Reputation: 1

Next.js app works locally but shows default page on GitHub Pages after deployment

I'm facing an issue where my Next.js app works perfectly fine locally, but after deploying it to GitHub Pages, it only shows the default Next.js landing page.

Here’s the scenario:

My setup:

The issue:

When I deploy the app to GitHub Pages, it shows the default Next.js welcome page (This is a Next.js project bootstrapped with create-next-app), rather than the expected app content. Locally, the app runs as expected.

What I’ve tried:

Despite these efforts, the app still shows the default page on GitHub Pages.

Upvotes: 0

Views: 70

Answers (1)

Matt
Matt

Reputation: 1

In the Options page of the repository, I had to select the gh-pages branch instead of the master branch. That's it.

Upvotes: 0

Related Questions