]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Add deploy script to generate and deploy static docs
authorMatt <matt@zurb.com>
Thu, 28 Feb 2013 19:04:17 +0000 (11:04 -0800)
committerMatt <matt@zurb.com>
Thu, 28 Feb 2013 19:04:17 +0000 (11:04 -0800)
docs/Capfile [new file with mode: 0644]
docs/config/deploy.rb [new file with mode: 0644]

diff --git a/docs/Capfile b/docs/Capfile
new file mode 100644 (file)
index 0000000..6a798eb
--- /dev/null
@@ -0,0 +1,4 @@
+load 'deploy'
+# Uncomment if you are using Rails' asset pipeline
+    # load 'deploy/assets'
+load 'config/deploy' # remove this line to skip loading any of the default tasks
\ No newline at end of file
diff --git a/docs/config/deploy.rb b/docs/config/deploy.rb
new file mode 100644 (file)
index 0000000..37c376b
--- /dev/null
@@ -0,0 +1,33 @@
+# use local key for authentication
+ssh_options[:forward_agent] = true
+default_run_options[:pty] = true
+
+set :application, "foundation"
+set :repository,  "git@github.com:zurb/#{application}.git"
+set :user, application
+set :deploy_to, "/var/www/foundation-docs"
+set :deploy_via, :remote_cache
+set :use_sudo, false
+set :branch, "4.0-wip"
+set :bundle_gemfile, "docs/Gemfile"
+
+set :scm, :git
+
+server 'foundation.zurb.com', :web
+
+after "deploy:update_code", "deploy:generate_static_site"
+set :keep_releases, 3
+after "deploy:update", "deploy:cleanup"
+
+namespace :deploy do
+  task :default do
+    update
+  end
+  
+  task :generate_static_site do
+    run "cd #{release_path}/docs && bundle exec ruby #{release_path}/docs/compile.rb"
+  end
+
+end
+
+require "bundler/capistrano"
\ No newline at end of file