vagrant push to deploy Vagrant

/cc @sethvargo !!!
This commit is contained in:
Mitchell Hashimoto 2014-12-12 00:53:50 -08:00
parent fa7131ff6e
commit 01cfc8951c
3 changed files with 18 additions and 0 deletions

8
Vagrantfile vendored
View File

@ -13,6 +13,14 @@ Vagrant.configure("2") do |config|
end
config.vm.provision "shell", inline: $shell
config.push.define "www", strategy: "local-exec" do |push|
push.script = "scripts/website_push_www.sh"
end
config.push.define "docs", strategy: "local-exec" do |push|
push.script = "scripts/website_push_www.sh"
end
end
$shell = <<-CONTENTS

View File

@ -8,5 +8,10 @@ DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
# Change into that directory
cd $DIR
# Add the git remote if it doesn't exist
git remote | grep heroku-docs || {
git remote add heroku-docs git@heroku.com:vagrantup-docs.git
}
# Push the subtree (force)
git push heroku-docs `git subtree split --prefix website/docs master`:master --force

View File

@ -8,5 +8,10 @@ DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
# Change into that directory
cd $DIR
# Add the git remote if it doesn't exist
git remote | grep heroku-www || {
git remote add heroku-www git@heroku.com:vagrantup-www.git
}
# Push the subtree (force)
git push heroku-www `git subtree split --prefix website/www master`:master --force