An example for putting static sites on Heroku, taken from Kenneth Reitz's blog post.
First, make sure you have the Heroku CLI installed.
You need the blank
index.php and correct
.htaccess file in order for
Heroku to serve your static site. You can then create your new Heroku
application by running the following on the commandline (with your
application's name substituted for
heroku create my-app-name -s cedar git push heroku master
You can then open your new static site with the following command:
During development, you'll probably want to still use
working on your project — rather than simply looking at the
index.html file in your browser of choice. You can use Python to serve
your content during development:
cd path/to/my/project python -m SimpleHTTPServer
Your project should then be up and running on:
Attaching your own custom domain to your Heroku instance is pretty easy.
heroku addons:add custom_domains heroku domains:add example.com heroku domains:add www.example.com
Make sure to attach the following A records using your DNS management tool:
184.108.40.206 220.127.116.11 18.104.22.168
For more information, make sure to read this Heroku devcenter article.