Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

degouville/nextjs-deploy-github-pages

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy Next.js to GitHub Pages

This is a Next.js template which can be deployed to GitHub Pages as a static site.

Deploying to GitHub Pages

  1. Create a new public GitHub repository
  2. Edit next.config.ts to match your GitHub repository name:
    • Given the pattern https://github.com/<user>/<repo>
    • Update your basePath config to the name of your repo (e.g. /repo)
  3. Push the starter code to the main branch
  4. Run the deploy script (e.g. npm run deploy) to create the gh-pages branch
  5. On GitHub, go to Settings > Pages > Branch, and choose gh-pages as the branch with the /root folder. Hit Save
  6. Make a change
  7. Run the deploy script again to push the changes to GitHub Pages

Congratulations! You should have a URL like:

https://<github-user-name>.github.io/<github-project-name>/

For more information, see our deployment documentation.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

About

Next.js template to deploy to GitHub Pages as a static site.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.