Introduction: Why Deployment Matters
You’ve built your website — now it’s time to share it with the world. In this guide, you’ll learn how to deploy a website using GitHub and Netlify quickly and easily, even if you’re a beginner. These powerful platforms let you publish your site directly from your GitHub repository with just a few clicks, and set up automatic updates every time you push new code.
Deploying your project might sound complicated at first, but once you know how to deploy a website using GitHub and Netlify, it becomes one of the simplest parts of web development.
Step 1: Push Your Project to GitHub
If your project isn’t already on GitHub, start by uploading it there.
- Create a free GitHub account (if you don’t have one).
- On the GitHub dashboard, click “New Repository.”
- Name your repo — for example:
my-portfolioormy-web-app. - Initialize it with a README (optional).
- Push your project to GitHub using Git or GitHub Desktop.
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/yourusername/my-website.git
git push -u origin main
Now your website code is safely stored and version-controlled on GitHub.
Step 2: Create a Netlify Account and Connect GitHub
Next, go to Netlify and sign up for free using your GitHub account.
Once you’re in the dashboard:
- Click “Add new site” → “Import an existing project.”
- Choose GitHub as your source.
- Authorize Netlify to access your repositories.
- Select your project repo.
Netlify will automatically detect your site’s build settings (for example, it might see npm run build for React apps or dist folder for static sites).
Step 3: Configure Your Build Settings
Netlify usually detects everything automatically, but if it doesn’t, here’s what to do:
- For static sites (HTML, CSS, JS):
- Build command: (leave blank)
- Publish directory:
/
- For React, Vue, or other frameworks:
- Build command:
npm run build - Publish directory:
distorbuild
- Build command:
Click “Deploy Site.”
Netlify will start building your site from your GitHub repository.
When it’s done, you’ll get a live link — something like: https://your-site-name.netlify.app
Congratulations! You’ve just deployed your website.
Step 4: Enable Continuous Deployment
Here’s the best part: once connected, Netlify automatically redeploys your website every time you push new code to GitHub.
That means:
- No need to manually upload files.
- Every update you commit goes live instantly.
- You can track all deployments and logs in the Netlify dashboard.
This setup is perfect for developers who want speed, automation, and reliability.
Step 5: Add a Custom Domain (Optional)
Want a professional-looking domain?
You can connect your own domain easily:
- In your Netlify dashboard, open Site Settings → Domain Management.
- Click “Add custom domain.”
- Enter your domain name (e.g.,
mywebsite.com). - Update your DNS settings to point to Netlify’s nameservers.
Netlify even offers free HTTPS certificates through Let’s Encrypt — so your site will be secure by default.
Final Thoughts
Deploying your site doesn’t have to be complicated. With this simple GitHub + Netlify workflow, you can:
- Keep your code organized and version-controlled.
- Deploy automatically with every commit.
- Manage custom domains and SSL effortlessly.
If you’re just getting started in web development, learning how to deploy a website using GitHub and Netlify is one of the most valuable skills you can gain — it bridges the gap between local projects and real-world web hosting.


