create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

Deployment to GitHub Pages

Open gesposito opened this issue 10 years ago • 7 comments

In order to provide a better DX, sticking to create-react-app's core ideas, I suggest replacing the manual steps of GitHub Pages deploy (the user has to setup a script himself?) with tools or setups like gh-pages.

Do you see any drawback for this?

I could take a look at it or let @tschaub take the honor.

gesposito avatar Aug 06 '16 08:08 gesposito

Happy to review a PR doing this!

gaearon avatar Aug 06 '16 12:08 gaearon

@gesposito @gaearon how about something more minimal like: https://github.com/X1011/git-directory-deploy It's just a single shell script with no dependencies.

winkerVSbecks avatar Aug 07 '16 16:08 winkerVSbecks

If we use something it must work good on Windows.

gaearon avatar Aug 07 '16 16:08 gaearon

Hi @gaearon. Probably we can use gh-pages package and create additional npm script, e.g. npm run deploy. Instead of using commandline interface of this package. From my point of view еhis gives us the ability to control output and error handling

Shastel avatar Aug 15 '16 12:08 Shastel

We might be able to take advantage of this: https://github.com/blog/2228-simpler-github-pages-publishing

chibicode avatar Sep 01 '16 11:09 chibicode

I feel that this is out of scope, especially now that it’s so simple to deploy to GH pages with /docs folder.

gaearon avatar Sep 03 '16 19:09 gaearon

Gh-pages deployment would be much easier if there was a way to change the build output path from /static/foo.css to static/foo.css to make it work on gh-pages, without doing it manually.

That way I can deploy just be doing rm -rf build && git checkout gh-pages && git merge master && npm run build && git add build/* -f && git commit -a -m "build files" && git push origin gh-pages && git checkout master

quantuminformation avatar Nov 03 '16 19:11 quantuminformation