Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Git Basics Branches Branching Out

Laurie Gray
Laurie Gray
23,119 Points

How do I deploy a static website once I know git?

So let's say I have finished my site and used git to make sure everything is organised and has a history etc and I'm working solo on a static site with html, css and js. Now I want to deploy it from github for example to a www. domain. How do I do that?

Many thanks amazing community!

4 Answers

sungwon choe
sungwon choe
15,044 Points

It depends on the web host, so when looking for a web host one thing you want to check for is if you can ssh into a terminal shell to run git and you have to check if they have git installed or will install it for you.

Once all those conditions are met, you can simple clone the github repository into the appropriate directory.

Or just use GitHub Pages.

There's also an (oldish) Treehouse blog post on how to do just that: Using GitHub Pages To Host Your Website

sungwon choe
sungwon choe
15,044 Points

Cool, didn't know about that feature.

I didn't realise how easy it was until I had a look at those pages! I just know that I always see websites on subdomains of github.io

Pavle Lucic
Pavle Lucic
10,801 Points

Is there a way to use git as a file manager. So for example, if you do some development on localhost, and with git creating versions and upload to web server?

Laurie Gray
Laurie Gray
23,119 Points

Thanks Iain. I watched the video. In the end I think I'm going to use beanstalk for the features and the hosting is done by myself.

wow