Add docs for local-exec

This commit is contained in:
Seth Vargo 2014-11-14 15:51:40 -05:00
parent 612eeb2265
commit 24595cb606
2 changed files with 49 additions and 2 deletions

View File

@ -293,8 +293,9 @@
<% if sidebar_section == "push" %>
<ul class="sub unstyled">
<li<%= sidebar_current("push-atlas") %>><a href="/v2/push/atlas.html">Atlas</a></li>
<li<%= sidebar_current("push-ftp") %>><a href="/v2/push/ftp.html"> FTP / SFTP</a></li>
<li<%= sidebar_current("push-heroku") %>><a href="/v2/push/heroku.html"> Heroku</a></li>
<li<%= sidebar_current("push-ftp") %>><a href="/v2/push/ftp.html">FTP / SFTP</a></li>
<li<%= sidebar_current("push-heroku") %>><a href="/v2/push/heroku.html">Heroku</a></li>
<li<%= sidebar_current("push-local-exec") %>><a href="/v2/push/local-exec.html">Local Exec</a></li>
</ul>
<% end %>

View File

@ -0,0 +1,46 @@
---
page_title: "Vagrant Push - Local Exec Strategy"
sidebar_current: "push-local-exec"
description: |-
The Vagrant Push Heroku strategy pushes your application's code to Heroku.
Only files which are committed to the Git repository are pushed to Heroku.
---
# Vagrant Push
## Local Exec Strategy
The Vagrant Push Local Exec strategy allows the user to invoke an arbitrary
shell command or script as part of a push.
<div class="alert alert-warn">
<p>
<strong>Warning:</strong> The Vagrant Push Local Exec strategy does not
perform any validation on the correctness of the shell script.
</p>
</div>
The Vagrant Push Local Exec strategy supports the following configuration
options:
- `command` - The command to execute (as a string).
### Usage
The Vagrant Push Local Exec strategy is defined in the `Vagrantfile` using the
`local-exec` key:
```ruby
config.push.define "local-exec" do |push|
push.command = <<-SCRIPT
scp . /var/www/website
SCRIPT
end
```
And then invoke the push with Vagrant:
```shell
$ vagrant push
```