Skip to content

Commit 590334e

Browse files
biilmanngaearon
authored andcommitted
Add Netlify to deploy instructions
1 parent a8d29c8 commit 590334e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

packages/react-scripts/template/README.md

+30
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ You can find the most recent version of this guide [here](https://github.com/fac
4646
- [GitHub Pages](#github-pages)
4747
- [Heroku](#heroku)
4848
- [Modulus](#modulus)
49+
- [Netlify](#netlify)
4950
- [Now](#now)
5051
- [Surge](#surge)
5152
- [Something Missing?](#something-missing)
@@ -911,6 +912,35 @@ You can find instructions in [Deploying React with Zero Configuration](https://b
911912
912913
See the [Modulus blog post](http://blog.modulus.io/deploying-react-apps-on-modulus) on how to deploy your react app to Modulus.
913914
915+
## Netlify
916+
917+
**To do a manual deploy to Netlify's CDN:**
918+
919+
```sh
920+
npm install netlify-cli
921+
netlify deploy
922+
```
923+
924+
Choose `build` as the path to deploy.
925+
926+
**To setup continuous delivery:**
927+
928+
With this setup Netlify will build and deploy when you push to git or open a pull request:
929+
930+
1. [Start a new netlify project](https://app.netlify.com/signup)
931+
2. Pick your Git hosting service and select your repository
932+
3. Click `Build your site`
933+
934+
**Support for client site routing:**
935+
936+
To support `pushState`, make sure to create a `public/_redirects` file with the following rewrite rules:
937+
938+
```
939+
/* /index.html 200
940+
```
941+
942+
When you build the project, Create React App will place the `public` folder contents into the build output.
943+
914944
### Now
915945
916946
See [this example](https://github.com/xkawi/create-react-app-now) for a zero-configuration single-command deployment with [now](https://zeit.co/now).

0 commit comments

Comments
 (0)