Created
November 6, 2017 15:53
-
-
Save steffencrespo/679072e95936e5f50980f88e5d3523f8 to your computer and use it in GitHub Desktop.
Deploying with Netlify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(https://courses.thinkful.com/react-001v3/assignment/1.4.1) | |
Deploy to Netlify: | |
SETUP | |
-(npm install -g netlify-cli if not yet installed) | |
-set all the requests to be routed to index.html: in the public folder, add a _redirects file with /* /index.html 200 in it | |
-run npm run build | |
-run netlify create (then get the site id that is stored into the .netlify file. | |
-add .netlify to gitignore (echo ".netlify" >> .gitignore) | |
-get the .netlify access token by running 'cat ~/.netlify/config’ | |
DEPLOY | |
-remember the access token from local .netlify/config file | |
-remember the site id from .netlify file | |
-run the command 'netlify deploy -p ./build -t <YOUR_ACCESS_TOKEN> -s <YOUR_SITE_ID>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment