How to deploy a react application to GitHub Pages

Veröffentlicht am: 29 April 2020
auf dem Kanal: Coding With Adam
2,698
53

How to deploy a react application to GitHub Pages. In this tutorial I show you how to find the documentation for deploying react applications to GitHub Pages. How to navigate the documentation. We cover everything from creating an application with npx create-react-app, making a GitHub repository and ultimately deploying our application to GitHub Pages.

If you like this video please subscribe like and share!

Steps 1
Add a homepage property to package.json
"homepage": "https://{github-user-name}.github.io/{Repository-name}",

Step 2 A
npm Install gh-pages

Step 2 B
Add predeploy and deploy script to scripts section of package.json
"predeploy": "npm run build",
"deploy": "gh-pages -d build",

Step 3
Deploy the application
npm run deploy

Links
https://create-react-app.dev/docs/dep...
https://create-react-app.dev/

React
https://reactjs.org/

npm GitHub pages
https://www.npmjs.com/package/gh-pages

My GitHub
https://github.com/codingwith-adam

Example of deployed app
https://codingwith-adam.github.io/Cov...

ReactJS
React
Deploy to GitHub Pages
Deployment of reactJS to GitHub pages
npm gh-pages


Auf dieser Seite können Sie das Online-Video How to deploy a react application to GitHub Pages mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Coding With Adam 29 April 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 2,698 Mal angesehen und es wurde von 53 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!