I have created a simple web site for GitHub Pages. The source of the site is in the \"master\" branch and the generated web site (what I want to see published) is under the \"gh
FWIW, this is the setup I used for publishing a personal page (i.e. https://user-name.github.io
) using Next.js and gh-pages:
develop
)next build && next export
.nojekyll
marker file in the export directory: touch out/.nojekyll
gh-pages -t -b master -d out
You can bundle these commands in package.json
to get a convenient yarn deploy
command:
scripts: {
...
"build": "next build",
"export": "yarn run build && next export",
"deploy": "yarn export && touch out/.nojekyll && gh-pages -t -b master -d out"
...