I have a React app I've created with create-react-app, which is deployed to Github Pages via the npm run deploy
command using the following:
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
More specifically, I have used the Github Pages steps from here: https://www.freecodecamp.org/news/surge-vs-github-pages-deploying-a-create-react-app-project-c0ecbf317089
I'm getting feedback on different versions of the application from some non-dev friends of mine, so I'd like to be able to make changes, push them to a branch, then deploy that branch to the homepage. Then if the changes are unpopular, I could deploy the master branch again, without me having to clutter up the master branch with merges and reverts. Is this possible, and if so, how would I do this? I've attempted "deploy": "gh-pages -b <branch-name> -d build"
in the scripts, but to no avail, and Google doesn't seem to answer this particular problem. (It may be that I'm unable to find it amidst the sea of "How to deploy a React app to Github Pages" tutorials, which I have solved)
Repository, in case further context is required: https://github.com/JayBaileyCS/cultivation-idle