diff --git a/Vagrantfile b/Vagrantfile index 075157ed9..cc27c7e95 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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 diff --git a/scripts/website_push_docs.sh b/scripts/website_push_docs.sh index ec2d8a09f..fd3937fc4 100755 --- a/scripts/website_push_docs.sh +++ b/scripts/website_push_docs.sh @@ -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 diff --git a/scripts/website_push_www.sh b/scripts/website_push_www.sh index 9e8bff265..1d5f180f9 100755 --- a/scripts/website_push_www.sh +++ b/scripts/website_push_www.sh @@ -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