Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • React Tutorial
  • React Exercise
  • React Basic Concepts
  • React Components
  • React Props
  • React Hooks
  • React Router
  • React Advanced
  • React Examples
  • React Interview Questions
  • React Projects
  • Next.js Tutorial
  • React Bootstrap
  • React Material UI
  • React Ant Design
  • React Desktop
  • React Rebass
  • React Blueprint
  • JavaScript
  • Web Technology
Open In App
Next Article:
How to Deploy React App on Netlify Using Github?
Next article icon

How to Deploy React App on Netlify Using Github?

Last Updated : 20 May, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

A React App is a web or mobile application that is built using the React library of JavaScript. It helps users create interactive, single-page, and dynamic applications. These applications are built using HTML, CSS, and JavaScript. Deployment of a React app can be done via GitHub, Netlify, or any other deployment platform. GitHub has its gh-pages, where the application can be built, started, and deployed. By deploying your project on such servers, you get a public URL for your project, which can be used to access your website or project.

How to Deploy React App on Netlify Using Github?

Netlify is one of the easiest deployment platforms to use. It has both features: 

  1. Using a GitHub repo 
  2. Simple Drag and Drop (the build folder). 

This makes Netlify very straightforward. To deploy a React App on Netlify using GitHub, the following steps must be followed:  

Steps to Deploy a React App on Netlify using GitHub  

Step 1: Create a React Application

At the very first, you need a react application. To create a react application, there are some prerequisites for your local system. There must be Node.js and npm installed in your system. If Node.js is not installed in your system, you can download it and install it. Also, to install npm, you can run the following command on your terminal -

npm install npm@latest -g

Now open your VS Code or some other IDE, Open the terminal, and run the following command to create a React App-

npx create-react-app My-Project

Navigate to your project directory, using the following command -

cd My-Project

And, start the React application by using the following command -

npm start

Step 2: Install the Required Dependencies 

First of all, open your code in Visual Studio Code or in any other IDE. 

Run the following command, in order to install the Netlify CLI package as a development dependency in your React project. 

npm install netlify-cli -g

This allows users to deploy the react app directly from the terminal. (This is not a required step)

Step 3: Create a Build directory

Using the following command, we will now create a build for our production.

npm run build

This creates the main directory as 'build'. This Build folder contains all the required files that we need to deploy our application. Now, we are ready to push this code into our GitHub repository. 

Step 4: Create a GitHub repository

Now, You have a react app on your local system. Open your GitHub account and create a new repository for your project. Name the repository anything you want, for example, My project. Push the code to the repository using Git Bash. For this, you need to have a good understanding of version controls.  

Our project is uploaded on Github, We'll now move forward towards deploying our project: There are various development platforms like Heruku, Vercel, Netlify, Github pages, Digital Ocean, etc. But one of the most popular and easy-to-use platforms is Netlify. We'll be using Netlify to deploy our project in this article. 

Step 5: Setting up Netlify

Create a Netlify account (if you have not any). Now, connect your GitHub account with Netlify. Authorize Netlify to use GitHub to access your repositories. 

Follow these steps further: 

  1. Go to the 'Sites' section from the header of the Netlify website's dashboard. 
  2. Now, click on 'Add new site'.
  3. Select 'import an existing project', This will redirect you to a page where it will ask you to connect a Git provider. 
  4. Select your Git provider, if our things are the same so far, choose GitHub. 
  5. This will take you to a page, where all your GitHub repositories are listed.
  6. Choose your project repository.
  7. Now, there will be some settings,
       a) Do not change the pre-filled details.
       b) Leave the Base Directory empty.
       c) In the Build Command, type "npm run build".
       d) In the Publish Directory, type "build".
  8. And, finally, click on the Deploy site.
  9. It'll redirect you to the deployment page, you can check the logs here, and see how things are working step by step.
  10. If the deployment fails for some reason, you'll get the error message. Remove the error and try deploying it again. 

By the time, The react app is deployed. Once the deployment gets completed, you get a public URL for your project with the domain 'netlify.com'. 

Step 6: Other ways to deploy 

Using the GitHub repository is not the only way to deploy a React App on Netlify, this can also be done by - 

  • Drag and Drop method
  • Using Netlify CLI (Command Line Interface)

Drag and Drop method is the easiest way to deploy your react app. All you need to do is, after step 3, Once you have to create a build directory, drag this 'build' folder, and drop it to the dashboard of Netlify. And start deploying. 

The other way is to use Netlify CLI. After performing Step 2, Navigate to your working directory and run the following command to deploy the application. 

netlify deploy

These were all the ways, a React application can be deployed on Netlify. 

Conclusion

Deployment of your project makes it available for other users on the web. Deploying it on Netlify makes it easier for developers to make their React app public. By connecting Netlify with your GitHub, you can configure the settings and deploy your application. The app becomes available on the web as soon as the deployment gets completed. Netlify has a continuous development environment, so it becomes easier to update the app whensoever some changes are made to the app and pushed to GitHub. Thus, Deploying the React app on Netlify using GitHub is actually very easy and pretty straightforward. With the above-given steps, one can easily create and publish one React app on Netlify.


Next Article
How to Deploy React App on Netlify Using Github?

A

anurag8546
Improve
Article Tags :
  • GBlog
  • Web Technologies
  • Git
  • ReactJS
  • GitHub
  • react-js
  • GIT
  • Web-Tech Blogs
  • GBlog 2025

Similar Reads

    How to Deploy Your React Websites on GitHub?
    Building a web application is always exciting for developers, especially when you step into the programming world for the first time. You build the front end of your application after a lot of struggle, and you want to showcase your skill, your creativity, and of course, your hard work to the world.
    6 min read
    How to Deploy website on Netlify
    You have your website ready and don't know how to reach the audience. Most of us coders create amazing websites using HTML, CSS, and JavaScript and just save them locally or on remote host services like GitHub and BitBucket. Now, what if you need non-programmers to view your work? This is why it bec
    2 min read
    Deployment of React Application using GitHub Pages
    Deploying a React application using GitHub Pages is an easy and efficient way to host your projects online for free. In this article, we will walk you through the steps to deploy your React app, making it accessible to users with a live URL. PrerequisitesA GitHub accountNode.js and npm installedBasi
    4 min read
    How to deploy React app to Heroku?
    React is a very popular and widely used library for building User Interfaces. So if you are thinking about deploying your React app to the cloud platform, there are various choices for doing that such as AWS EC2 or Heroku. But for testing your React app, Heroku will be the best option as it is free
    3 min read
    How to Deploy Node.js app on Netlify ?
    Netlify is a powerful platform that simplifies the process of deploying and managing web projects. It provides a wide range of features, including continuous deployment, automatic SSL, serverless functions, form handling, and much more. With Netlify, you can deploy static sites, single-page applicat
    3 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences