Skip to content

Commit

Permalink
changes to add ruby / heroku pages
Browse files Browse the repository at this point in the history
  • Loading branch information
garlovel committed Dec 3, 2012
1 parent c1535c8 commit fcfd494
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 41 deletions.
40 changes: 33 additions & 7 deletions 08_use-sphinxdoc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,39 @@ Archive and Publish Site
=============================

Normally a developer would compile work and display the result locally during
development. Then work would be deployed only when completed satisfactorily.
The Sphinx command to compile HTML pages from your documentation project is::
development.

Compiling and Previewing
-----------------------------

This works at Cloud9, too. The Sphinx command to compile HTML pages from your
documentation project is::

make clean html

This works at Cloud9, except for one thing: Cloud9 cannot directly display the
compiled HTML output. Your project must be deployed at GitHub as a **gh-pages**
repository branch before it can be viewed. The command to deploy documentation
in a **gh-pages** branch is::
To view the documents you have built, open the :file:`_build/html/index.html`
file in your Cloud9 project workspace. Then select :menuselection:`Preview`
from the top menu.

Committing Repository
-----------------------------

At the end of a day, or when a portion of work is finished, it should be
committed and pushed to the GitHub repository. Here are commands for that::

git add .
git status
git commit -m "commit message"
git push

Most of these actions are available from the Cloud9 menu as well.

Deploying
-----------------------------

Work would be deployed only when completed satisfactorily. Your project will be
deployed at GitHub as a **gh-pages** repository branch. The command to deploy
documentation in a **gh-pages** branch is::

bash github-deploy.sh

Expand All @@ -207,11 +231,13 @@ Now the sequence of steps to build and deploy output might be:
+-------------------------------+---------------------------------------------+
| Check for compile errors | ``make clean html`` |
+-------------------------------+---------------------------------------------+
| Preview changes in browser | cloud9 :menuselection:`Preview` |
+-------------------------------+---------------------------------------------+
| Add changes to git tracking | ``git add .`` |
+-------------------------------+---------------------------------------------+
| View repository status | ``git status`` |
+-------------------------------+---------------------------------------------+
| Commit changes to repository | ``git commit -m \"commit message\"`` |
| Commit changes to repository | ``git commit -m "commit message"`` |
+-------------------------------+---------------------------------------------+
| Push to remote at GitHub | ``git push`` |
+-------------------------------+---------------------------------------------+
Expand Down
1 change: 1 addition & 0 deletions 09_sample-ruby.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

34 changes: 0 additions & 34 deletions 09_use-heroku.rst

This file was deleted.

56 changes: 56 additions & 0 deletions 10_use-heroku.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
.. _use_heroku:

#############################
Using Heroku
#############################

Heroku provides a free web application deployment services, integrated with
the Cloud9 development environment through Git and GitHub. Following is a
brief outline for configuring and deploying a project on Heroku.

Install Heroku Tools
=============================
+ Open a project in Cloud9
+ In the Cloud9 Project, choose :menuselection:`View --> Console` from the menu
+ At the console command line, type::
c9pm install heroku

+ To make sure that your install was successful, and to get ready to use heroku,
run the following command in your Terminal::
heroku login
Enter your heroku username and password when prompted.

Add Heroku Server to Project
=============================

+ Open a project in Cloud9
+ In the Cloud9 Project, choose :menuselection:`View --> Console` from the menu
+ At the console command line, type::
heroku create
This will create a heroku server for your app, and configure your git
repository with an extra remote location that you can push to to deploy your
app.

+ To see the new git heroku deployment branch, type::

git remote -v

+ Open in a new browser tab, and bookmark, the url of your new heroku server,
which you will see in the output of the ``heroku create`` command. The URL
will look similar to this::

random-word-1234.herokuapp.com

+ After making changes to the project in Cloud9 and pushing to the GitHub
repository, deploy changes on Heroku with the additional command::

git push heroku master

+ Now you can view your live site at your heroku server URL (which you
bookmarked earlier).

0 comments on commit fcfd494

Please sign in to comment.