Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it work #1

Open
balupton opened this issue Apr 18, 2014 · 0 comments
Open

Make it work #1

balupton opened this issue Apr 18, 2014 · 0 comments

Comments

@balupton
Copy link
Member

Originally from: docpad/docpad#254

Now that the extensible cli is done. Having a heroku plugin would be awesome. Here's the requirements:

  1. Check if the heroku remote exists, if it doesn't then
    1. Check if gem exists, if it doesn't, tell them to install it, direct to a wiki page
    2. Check if heroku gem is installed, if it isn't, ask the user if they want it installed
    3. Check if they are logged in with the heroku gem, if not, get them to login
    4. Display a list of their heroku apps, ask if they want to use one or create a new one, if create a new one, what name should it use
    5. With the app they chose, add its git url as the heroku remote
  2. Deploy to the heroku remote

Alternatively, we can use the rest api instead, which would work like so:

  1. Check if the heroku remote exists, if it doesn't then
    1. Run heroku auth:token, and use the result. If it fails, ask for the user's heroku token
    2. Use the heroku token and rest api to fetch a list of apps
    3. List the apps to the user, ask them if they want to use one, or create a new one, if create a new one, what name should it have
    4. With the app they chose, fetch its heroku remote, and add it to the git repo
  2. Deploy to the heroku remote

We can also use the git api to setup a post hook to redeploy to heroku whenever master changes - link: http://developer.github.com/v3/repos/hooks/

Other steps:

  1. Will need to add a ssh key to heroku for docpad in order to do the git pushes to heroku
  2. Will need to create server.js, Procfile, package.json>main, and config.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant