rapp

Deployment Hooks

You can define tasks to be executed before pushing (locally) and after pushing (remotely) for each application. In order to do that, we use the tasks command.

This command takes three arguments:

$ wn tasks --help
Manages tasks executed before or after you push your changes
Usage: webbynode tasks action type [command]
Parameters:
    action              add, remove or show
    type                before_push or after_push
    command             task to perform, optional

Adding a new task

To add a new local task, you just have to use the add action of the before_push type. Let’s say we want to run Jammit to package our assets and upload it to our Webby:

$ wn tasks add before_push jammit
Before push task added.
Current tasks for "Before push":
1. jammit

and

$ wn tasks add before_push scp -r public/assets #{remote_app_path}/↩
public

Before push task added.

Current tasks for "Before push":
1. jammit
2. scp -r public/assets #{remote_app_path}/public

Listing current tasks

To check what tasks are currently configured before and after the deploy, use the show action:

$ wn tasks show

Comments
blog comments powered by Disqus