From 24595cb606f73380ad69be1b0a5496ab4a5bc614 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 14 Nov 2014 15:51:40 -0500 Subject: [PATCH] Add docs for local-exec --- website/docs/source/layouts/layout.erb | 5 +- .../docs/source/v2/push/local-exec.html.md | 46 +++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 website/docs/source/v2/push/local-exec.html.md diff --git a/website/docs/source/layouts/layout.erb b/website/docs/source/layouts/layout.erb index 315408de5..8a1883920 100644 --- a/website/docs/source/layouts/layout.erb +++ b/website/docs/source/layouts/layout.erb @@ -293,8 +293,9 @@ <% if sidebar_section == "push" %> <% end %> diff --git a/website/docs/source/v2/push/local-exec.html.md b/website/docs/source/v2/push/local-exec.html.md new file mode 100644 index 000000000..4c6c64d47 --- /dev/null +++ b/website/docs/source/v2/push/local-exec.html.md @@ -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. + +
+

+ Warning: The Vagrant Push Local Exec strategy does not + perform any validation on the correctness of the shell script. +

+
+ +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 +```