Originally from: docpad/docpad#254
Now that the extensible cli is done. Having a heroku plugin would be awesome. Here's the requirements:
- Check if the heroku remote exists, if it doesn't then
- Check if gem exists, if it doesn't, tell them to install it, direct to a wiki page
- Check if heroku gem is installed, if it isn't, ask the user if they want it installed
- Check if they are logged in with the heroku gem, if not, get them to login
- 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
- With the app they chose, add its git url as the heroku remote
- Deploy to the heroku remote
Alternatively, we can use the rest api instead, which would work like so:
- Check if the heroku remote exists, if it doesn't then
- Run
heroku auth:token, and use the result. If it fails, ask for the user's heroku token
- Use the heroku token and rest api to fetch a list of apps
- 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
- With the app they chose, fetch its heroku remote, and add it to the git repo
- 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:
- Will need to add a ssh key to heroku for docpad in order to do the git pushes to heroku
- Will need to create
server.js, Procfile, package.json>main, and config.json
Originally from: docpad/docpad#254
Now that the extensible cli is done. Having a heroku plugin would be awesome. Here's the requirements:
Alternatively, we can use the rest api instead, which would work like so:
heroku auth:token, and use the result. If it fails, ask for the user's heroku tokenWe 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:
server.js,Procfile,package.json>main, andconfig.json