Here's how I recently published dtrejo.com/colorpreview.
dtrejo.com, is a gh-pages site, which means that
dtrejo.com/$PROJECTNAMEwill resolve to any
$PROJECTNAMEgithub pages site for a repo under
github.com/dtrejo/colorpreview, and it will show under
npm i # I was told i needed these by `npm run build` npm i --save-dev stylus stylus-loader
npm run buildto create a
dist/folder, which I could then publish to
// for github pages off dtrejo.com/colorpreview/* assetsPublicPath: '/colorpreview/',
npm run buildagain
distfolder somewhere else, e.g.
dist-temp, just for now
dist, delete all the files and dotfiles except for the .git folder
dist-tempback into dist
git checkout -b gh-pages git add . # repeat from here whenever you rebuild git commit -m 'deploy' git push -u origin gh-pages
https://dtrejo.com/colorpreviewand you'll see your app!
Thankfully, I spent almost 0 time messing with webpack configs, and developing modern js apps in codesandbox is super painless. Thank you codesandbox.
It will be cool when it can support building/deploying to gh-pages and/or easy setup with a CI system that does the same. I suppose I should have investigated using travis or something to do deploys for me, maybe next time.
Growth Engineer at Credit Karma & consultant. Past clients include Aconex, Triplebyte, Neo, Brown Computer Science Department, Voxer, Cloudera, and the Veteran's Benefits Administration.