From fcfd4947dd6cb4e401d8b7b3ff7d709a120da6a4 Mon Sep 17 00:00:00 2001 From: Gerald Lovel Date: Mon, 3 Dec 2012 16:47:23 -0600 Subject: [PATCH] changes to add ruby / heroku pages --- 08_use-sphinxdoc.rst | 40 +++++++++++++++++++++++++------ 09_sample-ruby.rst | 1 + 09_use-heroku.rst | 34 --------------------------- 10_use-heroku.rst | 56 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 90 insertions(+), 41 deletions(-) create mode 100644 09_sample-ruby.rst delete mode 100644 09_use-heroku.rst create mode 100644 10_use-heroku.rst diff --git a/08_use-sphinxdoc.rst b/08_use-sphinxdoc.rst index 53e449e..0cbd85c 100644 --- a/08_use-sphinxdoc.rst +++ b/08_use-sphinxdoc.rst @@ -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 @@ -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`` | +-------------------------------+---------------------------------------------+ diff --git a/09_sample-ruby.rst b/09_sample-ruby.rst new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/09_sample-ruby.rst @@ -0,0 +1 @@ + diff --git a/09_use-heroku.rst b/09_use-heroku.rst deleted file mode 100644 index 9f6f254..0000000 --- a/09_use-heroku.rst +++ /dev/null @@ -1,34 +0,0 @@ -.. _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. - -Create Heroku Server Instance -============================= - -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:: - - c9pm install heroku - git remote add heroku git@heroku.com:__heroku-server__.git - - where ``__heroku-server__`` is replaced with your heroku server name - -+ To see the new git heroku deployment branch, type:: - - git remote -v - -+ 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 - diff --git a/10_use-heroku.rst b/10_use-heroku.rst new file mode 100644 index 0000000..1787f53 --- /dev/null +++ b/10_use-heroku.rst @@ -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). +