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 trialLaurie Gray
23,119 PointsHow 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
15,044 PointsIt 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.
Iain Simmons
Treehouse Moderator 32,305 PointsOr 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
15,044 PointsCool, didn't know about that feature.
Iain Simmons
Treehouse Moderator 32,305 PointsI 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
10,801 PointsIs 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
23,119 PointsThanks 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.
Thomas Katalenas
11,033 Pointswow