middleman-deploy 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +1 -0
- data/README.md +95 -120
- data/lib/middleman-deploy/commands.rb +1 -2
- data/lib/middleman-deploy/pkg-info.rb +1 -1
- data/middleman-deploy.gemspec +1 -1
- metadata +9 -4
- data/THANKS +0 -4
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,149 +1,124 @@
|
|
1
|
-
|
2
|
-
built site over rsync, ftp, sftp, or git (e.g. gh-pages on github).
|
1
|
+
# middleman-deploy [](https://travis-ci.org/tvaughan/middleman-deploy)
|
3
2
|
|
4
|
-
[
|
3
|
+
Deploys a [middleman](http://middlemanapp.com/) built site via **rsync**,
|
4
|
+
**ftp**, **sftp**, or **git** (e.g. gh-pages on github).
|
5
5
|
|
6
|
-
|
6
|
+
## Installation
|
7
7
|
|
8
|
-
|
8
|
+
Add this to the Gemfile of the repository of your middleman site:
|
9
9
|
|
10
|
-
|
11
|
-
|
10
|
+
```ruby
|
11
|
+
gem "middleman-deploy"
|
12
|
+
```
|
13
|
+
|
14
|
+
and run `bundle install`.
|
12
15
|
|
13
|
-
##
|
16
|
+
## Usage
|
14
17
|
|
15
|
-
|
18
|
+
```
|
19
|
+
$ middleman build [--clean]
|
20
|
+
$ middleman deploy [--build-before]
|
21
|
+
```
|
16
22
|
|
17
|
-
|
23
|
+
To automatically run `middleman build` during `middleman deploy`, turn on the
|
24
|
+
`build_before` option while activating the deploy extension:
|
18
25
|
|
19
|
-
|
26
|
+
```ruby
|
27
|
+
activate :deploy do |deploy|
|
28
|
+
# ...
|
29
|
+
deploy.build_before = true # default: false
|
30
|
+
end
|
31
|
+
```
|
20
32
|
|
21
|
-
|
33
|
+
## Possible Configurations
|
22
34
|
|
23
|
-
|
35
|
+
Middleman-deploy can deploy a site via rsync, ftp, sftp, or git.
|
24
36
|
|
25
|
-
|
37
|
+
### rsync
|
26
38
|
|
27
|
-
|
39
|
+
Make sure that `rsync` is installed, and activate the extension by adding the
|
40
|
+
following to `config.rb`:
|
28
41
|
|
29
|
-
|
42
|
+
```ruby
|
43
|
+
activate :deploy do |deploy|
|
44
|
+
deploy.method = :rsync
|
45
|
+
deploy.user = "tvaughan"
|
46
|
+
deploy.host = "www.example.com"
|
47
|
+
deploy.path = "/srv/www/site"
|
48
|
+
# Optional Settings
|
49
|
+
# deploy.port = 5309 # ssh port, default: 22
|
50
|
+
# deploy.clean = true # remove orphaned files on remote host, default: false
|
51
|
+
end
|
52
|
+
```
|
30
53
|
|
31
|
-
|
32
|
-
deploy.method = :rsync
|
33
|
-
deploy.user = "tvaughan"
|
34
|
-
deploy.host = "www.example.com"
|
35
|
-
deploy.path = "/srv/www/site"
|
36
|
-
end
|
54
|
+
### Git (e.g. GitHub Pages)
|
37
55
|
|
38
|
-
|
56
|
+
Make sure that `git` is installed, and activate the extension by adding the
|
57
|
+
following to `config.rb`:
|
39
58
|
|
40
|
-
|
59
|
+
```ruby
|
60
|
+
activate :deploy do |deploy|
|
61
|
+
deploy.method = :git
|
62
|
+
# Optional Settings
|
63
|
+
# deploy.remote = "custom-remote" # remote name or git url, default: origin
|
64
|
+
# deploy.branch = "custom-branch" # default: gh-pages
|
65
|
+
end
|
66
|
+
```
|
41
67
|
|
42
|
-
|
68
|
+
If you use a remote name, you must first add it using `git remote add`. Run
|
69
|
+
`git remote -v` to see a list of possible remote names. If you use a git url,
|
70
|
+
it must end with '.git'.
|
43
71
|
|
44
|
-
|
72
|
+
Afterwards, the `build` directory will become a git repo. This branch will be
|
73
|
+
created on the remote if it doesn't already exist.
|
45
74
|
|
46
|
-
|
75
|
+
### FTP
|
47
76
|
|
48
|
-
|
77
|
+
Activate the extension by adding the following to `config.rb`:
|
49
78
|
|
50
|
-
|
79
|
+
```ruby
|
80
|
+
activate :deploy do |deploy|
|
81
|
+
deploy.method = :ftp
|
82
|
+
deploy.host = "ftp.example.com"
|
83
|
+
deploy.user = "tvaughan"
|
84
|
+
deploy.password = "secret"
|
85
|
+
deploy.path = "/srv/www/site"
|
86
|
+
end
|
87
|
+
```
|
51
88
|
|
52
|
-
|
89
|
+
### SFTP
|
53
90
|
|
54
|
-
|
91
|
+
Activate the extension by adding the following to `config.rb`:
|
55
92
|
|
56
|
-
|
93
|
+
```ruby
|
94
|
+
activate :deploy do |deploy|
|
95
|
+
deploy.method = :sftp
|
96
|
+
deploy.host = "sftp.example.com"
|
97
|
+
deploy.user = "tvaughan"
|
98
|
+
deploy.password = "secret"
|
99
|
+
deploy.path = "/srv/www/site"
|
100
|
+
end
|
101
|
+
```
|
57
102
|
|
58
|
-
|
103
|
+
## Breaking Changes
|
59
104
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
deploy.
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
If you use a remote name, you must first add it using `git remote
|
78
|
-
add`. Run `git remote -v` to see a list of possible remote names. If
|
79
|
-
you use a git url, it must end with '.git'.
|
80
|
-
|
81
|
-
To use a particular branch, add:
|
82
|
-
|
83
|
-
deploy.branch = "some-other-branch-name"
|
84
|
-
|
85
|
-
Default is `gh-pages`. This branch will be created on the remote if it
|
86
|
-
doesn't already exist.
|
87
|
-
|
88
|
-
## Step 3c - FTP setup
|
89
|
-
|
90
|
-
**These settings are required.**
|
91
|
-
|
92
|
-
Edit `config.rb`, and add:
|
93
|
-
|
94
|
-
activate :deploy do |deploy|
|
95
|
-
deploy.method = :ftp
|
96
|
-
deploy.host = "ftp.example.com"
|
97
|
-
deploy.user = "tvaughan"
|
98
|
-
deploy.password = "secret"
|
99
|
-
deploy.path = "/srv/www/site"
|
100
|
-
end
|
101
|
-
|
102
|
-
Adjust these values accordingly.
|
103
|
-
|
104
|
-
## Step 3d - SFTP setup
|
105
|
-
|
106
|
-
**These settings are required.**
|
107
|
-
|
108
|
-
Edit `config.rb`, and add:
|
109
|
-
|
110
|
-
activate :deploy do |deploy|
|
111
|
-
deploy.method = :sftp
|
112
|
-
deploy.host = "sftp.example.com"
|
113
|
-
deploy.user = "tvaughan"
|
114
|
-
deploy.password = "secret"
|
115
|
-
deploy.path = "/srv/www/site"
|
116
|
-
end
|
117
|
-
|
118
|
-
Adjust these values accordingly.
|
119
|
-
|
120
|
-
## Step 4
|
121
|
-
|
122
|
-
middleman build [--clean]
|
123
|
-
middleman deploy [--build-before]
|
124
|
-
|
125
|
-
To run `middleman build` before `middleman deploy`, add:
|
126
|
-
|
127
|
-
deploy.build_before = true
|
128
|
-
|
129
|
-
Default is `false`.
|
130
|
-
|
131
|
-
## BREAKING CHANGES
|
132
|
-
|
133
|
-
* v0.1.0
|
134
|
-
|
135
|
-
* Removed the `--clean` command-line option. This option only applied
|
136
|
-
to the rsync deploy method. The idea going forward is that
|
137
|
-
command-line options must apply to all deploy methods. Options that
|
138
|
-
are specific to a deploy method will only be available in
|
139
|
-
`config.rb`.
|
140
|
-
|
141
|
-
* Removed `deploy` from the `after_build` hook. This caused a
|
142
|
-
`deploy` to be run each time `build` was called. This workflow never
|
143
|
-
made sense. `deploy` was added to the `after_build` hook simply
|
144
|
-
because it was available.
|
145
|
-
|
146
|
-
## NOTES
|
105
|
+
* `v0.1.0`
|
106
|
+
- Removed the `--clean` command-line option. This option only applied to
|
107
|
+
the rsync deploy method. The idea going forward is that command-line
|
108
|
+
options must apply to all deploy methods. Options that are specific to a
|
109
|
+
deploy method will only be available in `config.rb`.
|
110
|
+
- Removed `deploy` from the `after_build` hook. This caused a `deploy` to
|
111
|
+
be run each time `build` was called. This workflow never made
|
112
|
+
sense. `deploy` was added to the `after_build` hook simply because it
|
113
|
+
was available.
|
114
|
+
|
115
|
+
## Thanks!
|
116
|
+
|
117
|
+
A **BIG** thanks to
|
118
|
+
[everyone who has contributed](https://github.com/tvaughan/middleman-deploy/graphs/contributors)!
|
119
|
+
Almost all pull requests are accepted.
|
120
|
+
|
121
|
+
## Other
|
147
122
|
|
148
123
|
Inspired by the rsync task in
|
149
124
|
[Octopress](https://github.com/imathis/octopress).
|
@@ -36,8 +36,7 @@ module Middleman
|
|
36
36
|
end
|
37
37
|
if build_before
|
38
38
|
# http://forum.middlemanapp.com/t/problem-with-the-build-task-in-an-extension
|
39
|
-
|
40
|
-
builder.build
|
39
|
+
run("middleman build") || exit(1)
|
41
40
|
end
|
42
41
|
send("deploy_#{self.deploy_options.method}")
|
43
42
|
end
|
data/middleman-deploy.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ["Tom Vaughan"]
|
10
10
|
s.email = ["thomas.david.vaughan@gmail.com"]
|
11
|
-
s.homepage = "http://tvaughan.github.
|
11
|
+
s.homepage = "http://tvaughan.github.io/middleman-deploy/"
|
12
12
|
s.summary = Middleman::Deploy::TAGLINE
|
13
13
|
s.description = Middleman::Deploy::TAGLINE
|
14
14
|
s.license = "MIT"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: middleman-core
|
@@ -72,7 +72,6 @@ files:
|
|
72
72
|
- Gemfile
|
73
73
|
- README.md
|
74
74
|
- Rakefile
|
75
|
-
- THANKS
|
76
75
|
- features/support/env.rb
|
77
76
|
- lib/middleman-deploy.rb
|
78
77
|
- lib/middleman-deploy/commands.rb
|
@@ -80,7 +79,7 @@ files:
|
|
80
79
|
- lib/middleman-deploy/pkg-info.rb
|
81
80
|
- lib/middleman_extension.rb
|
82
81
|
- middleman-deploy.gemspec
|
83
|
-
homepage: http://tvaughan.github.
|
82
|
+
homepage: http://tvaughan.github.io/middleman-deploy/
|
84
83
|
licenses:
|
85
84
|
- MIT
|
86
85
|
post_install_message:
|
@@ -93,12 +92,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
92
|
- - ! '>='
|
94
93
|
- !ruby/object:Gem::Version
|
95
94
|
version: '0'
|
95
|
+
segments:
|
96
|
+
- 0
|
97
|
+
hash: 1810602657871223633
|
96
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
99
|
none: false
|
98
100
|
requirements:
|
99
101
|
- - ! '>='
|
100
102
|
- !ruby/object:Gem::Version
|
101
103
|
version: '0'
|
104
|
+
segments:
|
105
|
+
- 0
|
106
|
+
hash: 1810602657871223633
|
102
107
|
requirements: []
|
103
108
|
rubyforge_project:
|
104
109
|
rubygems_version: 1.8.23
|
data/THANKS
DELETED