4 ms·
So you just build your app and pushes the "binary" output on Github Pages? It would be better to push the output dir to another branch folder and force push it
by Orphis 7y ago
So you just build your app and pushes the "binary" output on Github Pages?
It would be better to push the output dir to another branch folder and force push it when you update.
- mplewis 7y agoThis is what I do. Instead of committing /docs, I build into the root of the repo under the gh-pages branch. I use this package to help: https://www.npmjs.com/package/gh-pages https://www.npmjs.com/package/gh-pages
- codetrotter 7y agoYeah, creating an orphan “gh-pages” branch is what I always do. Repositories that include build output in the main branch make me rather quite upset. Your additional point about force pushing is a good one also. While I’ve been using separate branch I’ve still been commiting each new build as a new commit. But overwriting the initial commit makes a lot more sense actually.