How to Deploy Your Website for Free Using GitHub and Vercel (Step-by-Step Guide)

How to Deploy Your Website for Free Using GitHub and Vercel (Step-by-Step Guide)
Have you built a website on your computer and want to make it accessible to everyone on the internet? You don't need to purchase expensive hosting or a domain to get started!
In this tutorial, we'll show you how to publish your locally developed website online completely free using Git, GitHub, and Vercel.
We'll walk through the entire process, starting with your local project in Visual Studio Code, creating a GitHub repository, uploading your source code, and deploying your website on Vercel. By the end, you'll have a live website with its own free Vercel domain that anyone can access from anywhere.
For this demonstration, we'll deploy our Smart Hydration Tracker project.
What You'll Learn in This Tutorial
This is a beginner-friendly, step-by-step guide covering everything you need to publish your first website.
Here's what we'll cover:
- Open Your Project in VS Code: Prepare your locally developed website and AI coding environment.
- Run Your Website Locally: Make sure everything works correctly before deployment.
- Understand Git and GitHub: Learn why version control and online repositories are important.
- Install and Configure Git: Set up Git on your computer.
- Create a GitHub Account: Connect Visual Studio Code with GitHub.
- Upload Your Project to GitHub: Push your local source code to a remote repository.
- Understand Domains and Hosting: Learn how websites become accessible on the internet.
- Deploy with Vercel: Connect your GitHub repository and publish your website for free.
- Test Your Live Website: Open your deployment URL and verify that everything works.
- Automatic Deployment: Learn how changes pushed to GitHub automatically update your live website.
Tools and Platforms You'll Need
We'll use three essential tools to deploy our website.
1. Git
Git is a free, open-source version control system that helps developers track changes in their source code.
It allows you to save project versions, manage changes, and upload your code to platforms like GitHub.
Official Website: https://git-scm.com/
2. GitHub
GitHub is an online platform for hosting and managing Git repositories.
It allows you to store your project code online, collaborate with other developers, and connect your repositories to deployment platforms.
Official Website: https://github.com/
3. Vercel
Vercel is a cloud platform for deploying modern web applications. It integrates with GitHub and makes publishing websites simple.
For supported projects, you can connect a repository and let Vercel automatically build and deploy your website.
Vercel offers a free Hobby plan suitable for personal projects and learning.
Official Website: https://vercel.com/
Step-by-Step: Deploy Your Website for Free
Step 1: Open Your Website Project in VS Code
Start by opening your locally developed website project in Visual Studio Code.
If you're using an AI coding assistant, you can also use it to review your project, fix errors, and prepare it for deployment.
Step 2: Run Your Project Locally
Before uploading your project, make sure it works correctly on your computer.
Start the development server and open the local URL in your browser.
Check your website's pages, navigation, responsiveness, and functionality. Fix any errors before proceeding.
Step 3: Understand Git and GitHub
Git and GitHub are two different things.
- Git is the version control software installed on your computer.
- GitHub is an online platform where you can host your Git repositories.
Together, they make managing and deploying your website much easier.
Step 4: Install and Configure Git
Download Git from its official website and install it on your Windows computer.
After installation, open PowerShell or the VS Code terminal and verify that Git is working.
You can check the installation using:
git --version
Configure your Git username and email:
git config --global user.name "Your Name"
git config --global user.email "your-email@example.com"
Step 5: Create a GitHub Account and Connect VS Code
Visit GitHub and create a free account if you don't already have one.
Next, sign in to GitHub through Visual Studio Code. This allows you to manage your repositories directly from your development environment.
Step 6: Push Your Project to GitHub
Create a new repository on GitHub and connect it to your local project.
You can use the following Git commands from your project directory:
git init
git add .
git commit -m "Initial project commit"
git branch -M main
git remote add origin YOUR_GITHUB_REPOSITORY_URL
git push -u origin main
Replace YOUR_GITHUB_REPOSITORY_URL with your actual GitHub repository URL.
Once the push is successful, refresh your GitHub repository to verify that your project files are uploaded.
Important: Never upload passwords, API secrets, private keys, or environment files containing sensitive credentials to a public repository. Use .gitignore and configure environment variables securely.
Step 7: Understand Domains and Web Hosting
Before deploying your website, it's useful to understand two important concepts.
- Domain: The address people use to access your website, such as
example.com. - Web Hosting: The service that stores and serves your website files so visitors can access them online.
Vercel provides hosting and a free vercel.app subdomain, so you can publish your website without purchasing a domain initially.
Step 8: Create a Vercel Account
Visit the official Vercel website and sign up using your GitHub account.
Connecting GitHub makes importing your existing repositories much easier.
Step 9: Import Your GitHub Repository into Vercel
After signing in to Vercel:
- Open your Vercel dashboard.
- Select the option to add a new project.
- Import your GitHub repository.
- Review the project configuration.
- Select the appropriate framework and build settings.
- Configure any required environment variables.
- Click Deploy.
Vercel will install the dependencies, build your project, and publish it online.
Step 10: Test Your Live Website
Once deployment is complete, Vercel will provide a live URL for your website.
Open the URL in your browser and test the website.
Check that all pages load correctly, images appear, navigation works, and the website is responsive on different screen sizes.
You can also configure a custom domain later if you own one.
Step 11: Update Your Website Automatically
One of the biggest advantages of connecting GitHub with Vercel is automatic deployment.
Whenever you make changes to your local project, commit those changes, and push them to your connected GitHub branch, Vercel automatically starts a new deployment.
For example:
git add .
git commit -m "Update website design"
git push
Vercel detects the new commit, rebuilds your project, and updates your live website after a successful deployment.
You don't need to upload your website manually every time you make changes!
Watch the Complete Video Tutorial
Follow the complete Urdu video tutorial to learn how to deploy your website from your local computer to the internet using GitHub and Vercel.
https://www.youtube.com/watch?v=fCBzw148vHE
Video Chapters
| Timestamp | Topic |
|---|---|
| 00:00 | Introduction & Live Website Demo |
| 00:20 | Opening Your Project & AI Setup in VS Code |
| 01:35 | Running the Project Locally |
| 02:27 | Why You Need Git and GitHub |
| 03:06 | Installing & Setting Up Git |
| 04:17 | Creating a GitHub Account & Linking VS Code |
| 05:40 | Pushing Your Code Repository to GitHub |
| 06:24 | What Are Domains and Web Hosting? |
| 07:20 | Setting Up Free Hosting on Vercel |
| 08:44 | Importing GitHub Repository & Deploying |
| 10:04 | Testing Your Live URL & Custom Domain Settings |
| 11:00 | Making Changes Locally & Auto-Updating the Live Site |
| 12:03 | Summary & Next Steps |
See the Live Website Example
We used the Smart Hydration Tracker project to demonstrate the complete deployment process.
You can visit the live website here:
Live Demo: https://smart-hydration-tracker.vercel.app/
This is an example of how you can turn a locally developed project into a publicly accessible website using free developer tools.
Is GitHub and Vercel Hosting Really Free?
Yes! You can get started without paying for hosting or purchasing a domain.
GitHub provides free repositories, while Vercel offers a free Hobby plan for eligible personal projects.
However, keep in mind that free plans have usage limits and specific terms of use. Always check the latest pricing and plan restrictions before deploying commercial or production projects.
Conclusion
Publishing a website online might seem complicated when you're a beginner, but GitHub and Vercel make the process much easier.
With Git, you can manage your source code. With GitHub, you can store your project online. And with Vercel, you can deploy your website and make it accessible to the world.
The best part is that you can start completely free!
If you've been building websites locally but haven't published one yet, this is the perfect opportunity to take your first step.
Build locally. Push to GitHub. Deploy with Vercel. Share your website with the world!
If you found this tutorial helpful, don't forget to like the video, subscribe to the Complex To Easy YouTube channel, and leave your questions in the comments.
Complex To Easy – Everything Will Be Just Easy!
Helpful Resources
- Complex To Easy: https://complextoeasy.com
- Git: https://git-scm.com/
- GitHub: https://github.com/
- Vercel: https://vercel.com/
- Smart Hydration Tracker (Live Demo): https://smart-hydration-tracker.vercel.app/
- YouTube Channel: https://youtube.com/@complextoeasy
Tags
GitHub Tutorial, Vercel Tutorial, Free Website Hosting, Deploy Website for Free, How to Host a Website, Git Tutorial for Beginners, Git and GitHub, GitHub Deployment, Vercel Deployment, Free Web Hosting, Deploy Website with GitHub, Host Website on Vercel, Website Development, Web Development Tutorial, VS Code Tutorial, Git Commands, Automatic Deployment, Continuous Deployment, CI CD for Beginners, Next.js Deployment, AI Website Development, Build Website with AI, Website Series, Urdu Tech Tutorial, Computer Tutorials in Urdu, Complex To Easy
Share this post
Written by Complex To Easy Editorial Team
Hands-on guides from a team that ships .NET, Angular, SQL Server and Oracle projects. Every article is based on production work, not theory. About us · Report an issue
Free browser tools
Calculators, converters, and developer utilities that run in your browser with no signup.
Browse the tools →Business software
Small systems for invoicing, payroll, inventory, and stock, or a custom build when needed.
See the products →Enjoyed this post?
Get more tips and product updates straight to your inbox.