https://cowglow.github.io/simple-gh-page-demo/
No matter where you are at with your project, you can add the gh-pages
dependency, add the script to your package scripts and publish your site.
Things to keep in mind. You can not have server side rendering. so everything should be static. In this example you have one directory with one html file. That is in essence what we are publishing.
Add dependency
npm install --save-dev gh-pages
Add package script
"scripts": {
....
"deploy": "gh-pages -d build"
}
Publish, but first, make sure your target directory, in this example build
, only contains static content. No SSR is available. This means you'll probably run a "pre-deploy" script if necessary.
npm run deploy
I'm American living and working in Germany.
- Fork it
- Code it!
- Do it on your own!
MIT