How to Deploy a Website using Vercel
Vercel provides fast and secure hosting for your web app. In this guide, we will walk through deploying a static site step by step using Vercel CLI...
1. Create a Github account and Login
⚡First, open your browser and go to the GitHub site-->github.com
Sign in using any Method:
1.Continue with Google
2.Continue with Apple.....etc
........................
⚡Next, click the plus icon (+) in the top Right "Create a New Repository" with the any name (eg: yoursite_name)
"Enter a Repository" name and "Choose visibility *" is Public.
next, turn "On" the Add Readme.md file (as your wish)..
now, scroll down and click the Create Repository Green button
Successfully Repository created Now!
2. Pushing the Full Code on the github Repository
fisrt, open the main folder in Visual Studio Code, or any Code Editor.
next, open the New Turminal and run the below command line one by one..
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin "your_github_repo_link_paste_here!"
git push -u origin main
💡 Note: When you run git push, if a browser login prompt appears, click on "Sign in with your browser" and authorize it on the GitHub website. Your code will be successfully pushed.
3. Create a account and Login
⚡First, open your browser and go to the vercel site--> Vercel.com.
Sign in using any Method:
1.Continue with Google
2.Continue with Github
3.Continue with ChatGPT
........................
⚡Next, click the Create a New Project
4. Import Git Repository
⚡Add your github account
Next, ⚡ Searching the Repository name..... and CLick the "Configure Github App"
Now, we go a new new page On your Github Account Applications Section
Scroll Down ! Go to the "Repository access" and select your github Repository form "Only select repositories".
now, click on the "Save" button.
Next, simply refresh the vercel New Project page and automatic fetch the your all the save repositories
Now select the Repository and click the "import" button.
Next, simple click the "Deploy"button with any changes. and "waiting" the some seconds...
✔ Boom! Now, your site is Successfully Live/Deploy Congratulations....
Hosting URL : "yoursite.vercel.app"copy-paste the URL in any brower.
5. Deploy/Update your Website again (in future)
Any type changes in your website main folder in the codes (HTML, CSS,etc....) then, we simple run the below cammnad in the terminal.
git init
git add .
git commit -m "Initial commit"
git branch -M main
Here! we do simple "update the github Repository" and only "update the github Repository"waiting somr time vercel site is successfully updated automatically according to the Updated github Repository.
Again Congratulations! Your website is updated Now.
Hosting URL : "yoursite.vercel.app"copy-paste the URL in any brower.
Search your Website on the any browser, if can't seen any update/ changes on the site then, hard refresh / hard reload the browser. Try it below instruction...
1. ----> ctrl+F5
2. ----> ctrl+shift+R