How to use GitHub pages and host or deploy my HTML CSS and JavaScript means front end #166984
-
Select Topic AreaGeneral BodyHow do we use Github pages to host or deploy my website which is made on HTML CSS and JavaScript. I have made an repository and I am unable to understand how to host it completely on Github |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
To host your HTML, CSS, and JavaScript frontend using GitHub Pages, follow these steps: ✅ Step-by-Step Guide Go to https://github.com/ and create a new repository (public or private). Give it a name (e.g., my-frontend-site). Add Your Files If you haven’t already, upload your HTML, CSS, and JS files to the repo. Use the GitHub web interface (Add file > Upload files) Use Git locally with: bash Go to your repository on GitHub. Click on Settings > Pages (or go to https://github.com/your-username/your-repo-name/settings/pages). Under "Source", choose the branch (usually main) and the root folder (/root or /docs). Click Save. Access Your Live Website GitHub will generate a URL like: Your frontend will be visible there! |
Beta Was this translation helpful? Give feedback.
-
|
You might already know other options, but it's worth trying Vercel — it's very simple to use. |
Beta Was this translation helpful? Give feedback.
To host your HTML, CSS, and JavaScript frontend using GitHub Pages, follow these steps:
✅ Step-by-Step Guide
Create a GitHub Repository
Go to https://github.com/ and create a new repository (public or private).
Give it a name (e.g., my-frontend-site).
Add Your Files
If you haven’t already, upload your HTML, CSS, and JS files to the repo.
You can:
Use the GitHub web interface (Add file > Upload files)
OR
Use Git locally with:
bash
Copy
Edit
git init
git remote add origin https://github.com/your-username/your-repo-name.git
git add .
git commit -m "Initial commit"
git push -u origin main
Enable GitHub Pages
Go to your repository on GitHub.
Click on Settings > Pages (or go to https://github.c…