Reputation: 1
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:
The app runs locally on localhost:3000
without any problems.
I am deploying it to GitHub Pages using GitHub Actions.
The repository https://github.com/mateuszkozlowski/krakow-airport is hosted at https://mateuszkozlowski.github.io/krakow-airport/
.
Next.js version: 15.0.4
Deployment method: Using GitHub Actions and the gh-pages-deploy-action
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.
I ensured the basePath and assetPrefix are correctly set in next.config.js
.
I’ve verified that the out
folder contains the exported static files.
I’ve confirmed the GitHub Pages source is correctly set to the gh-pages
branch.
Despite these efforts, the app still shows the default page on GitHub Pages.
Upvotes: 0
Views: 70
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