How to deploy a website

0 votes

How to deploy a website?

I've built a website with HTML, CSS, and JavaScript, and I’m ready to deploy it. What’s the easiest way to get it online? I’ve heard of options like Netlify and GitHub Pages—any advice on setting it up or using a custom domain?

Oct 29, 2024 in Web Development by Nidhi
• 8,920 points
127 views

1 answer to this question.

0 votes

You can deploy your website using Netlify and Github

Let’s take a look how you can deploy a website using Github:

Step 1: Log in to Github

Once you have logged in successfully, click on the “New” button on the top left side to create a new repository.

Step 2: Create a new repository

Add the repository name and click on the “Create Repository” button.

Once you click on “Create Repository” you will be directed to a page where you will find the commands that you need to execute so that you can push your code to Github.

Execute those commands on your editor (VS code or any other editor)

Step 3: Add your local code to the Github

Once the code is successfully pushed, refresh the page and you will be able to see your files and folders.

Step 4: Go to Settings and look for Github pages

Now to host your website click on “Settings” and scroll down to ‘Github Pages’.

Step 5: Setup Github pages

The next step involves setting up the Github pages. To do this:

  • Select ‘main’.
  • Click on ‘save’.
  • Click on the generated link.

Now let’s see using Netlify

Step 1: Log in to Netlify using Github

On clicking log in, you will be directed to the following page. Click on Github.

Step 2: Authorize Netlify

A sign-in page will appear, where you need to enter your Github credentials and continue.

After the successful authentication, you will be redirected to Netlify’s homepage where you can see all the sites that you have hosted.

Now to host your new website click on the “New Site from Git” button.

Step 3: New Site from Git

Following this, you can choose from where you want to fetch your code(We will use Github)

Step 4: Pick the version control system of your choice: After you click on Github, you will be redirected to an authentication page. After successful authentication, simply choose the repository you want to host your website.

Step 5: Choose the repository of your choice

Once you choose the repository of your choice, check some of your site settings. In most cases, this will be the default setting for you to host your website. 

Step 6: Deploy site / Configure settings
Now click on “Deploy site” and Netlify will do the needful.

While your site is being deployed, you will see “site deploy in progress”
Once your site is deployed, you will be able to see the URL. 

Click on the URL to access your site.

Your site is now deployed and is accessible to anyone over the internet.

answered Oct 29, 2024 by kavya

Related Questions In Web Development

+1 vote
2 answers

How to embed Google map on my website?

1. Search whatever you want to embed. 2. ...READ MORE

answered Jan 17, 2020 in Web Development by anonymous
1,458 views
+1 vote
1 answer

How to access the Angularjs scope of a particular html element from our console?

Hello, You should follow the below steps:-- 1.Compile and ...READ MORE

answered Jan 21, 2020 in Web Development by Niroj
• 82,840 points

edited Jan 21, 2020 by Niroj 3,170 views
0 votes
0 answers

How to start Airbnb Clone for Movies and Events Booking Website?

Instant #Online Movies and Events Ticket Booking ...READ MORE

Feb 17, 2020 in Web Development by Bessie
• 160 points

reshown Feb 18, 2020 by Gitika 907 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
10,882 views
0 votes
1 answer

Using/Handling colon inside a JSF generated HTML element ID in CSS selector

Yes, you can.  Just Backslash (\) the colon.  Like ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,250 points
2,948 views
0 votes
1 answer

What is a css selector and where is it used?

CSS Selector is a combination of element ...READ MORE

answered Nov 21, 2018 in Data Analytics by Kalgi
• 52,350 points
1,019 views
0 votes
1 answer

What is the difference between span and div?

The div should be used to wrap sections of ...READ MORE

answered Jan 16, 2020 in Web Development by Niraj

edited Jan 21, 2020 by Niroj 3,844 views
0 votes
1 answer

How do you apply a hover effect to an element using CSS?

Applying a hover effect in CSS allows you to ...READ MORE

answered Oct 29, 2024 in Web Development by kavya
214 views
0 votes
1 answer

How to create a service file in Angular?

To create a service file in Angular, ...READ MORE

answered Nov 13, 2024 in Web Development by kavya
108 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP