1.Herokuにアプリケーションを作成する
//Herokuにログインする
$heroku auth:login
Enter your Heroku credentials.
Email: example@example.com
Password (typing will be hidden):
//Herokuに新しいスタックを作成する
//明示的にcedarスタックを作成する
$Heroku create --stack cedar ytakataapps
Creating ytakataapps... done, stack is cedar
http://ytakataapps.herokuapp.com/ | git@heroku.com:ytakataapps.git
! Notice: on Wed, 20 June, our default stack will change to Cedar. http://bit.ly/Lh0rM5
heroku create --stack cedarについては以下のページの相澤さんからのコメントを見るとわかりやすい
http://dqn.sakusakutto.jp/2012/04/github-heroku-push.html
リンクが切れると嫌なので以下引用
また -s cedar というオプションはherokuに作られる実行環境の種類を指定するものです。
この場合はCedarスタックという最新の実行環境が適用された実行環境ができます。
ちなみに -s cedar を指定しないと bambooスタックで実行環境がつくられます。
CedarスタックとBambooスタックの最も大きな違いはBambooスタックではRubyアプリケーション
しか実行できないがCedarスタックではRuby以外の言語(Java、Python、Node.js、Scalaなど)が
実行可能なことです。
正式な情報はこちら(追記)
https://devcenter.heroku.com/articles/stack
2.Herokuにデプロイするアプリケーションを作成する
//ここは好きなアプリを作成してね
$play new sample -with scala
$cd sample
$play run
//これでとりあえずplayのアプリができる
3.アプリケーションをgitに登録
//gitのリポジトリを初期化
$git init
//1で作成したリポジトリをherokuという名前で登録
$git remote add heroku git@heroku.com:XXXXXXXXXX.git
//ここで登録したリポジトリherokuを削除するには
$ git remote rm heroku
//herokuのリポジトリのmasterにプッシュ
$git push heroku master
//蛇足ですが…
//herokuのアプリケーション名を変えたいときは
$heroku apps:rename newname --app oldname
//別にコマンドからじゃなくて、herokuのウェブコンソールからでも簡単にできます。