octopress-deploy 1.2.6 → 1.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86e904b2e06c8c70df12dd4e301e97099f1619d4
4
- data.tar.gz: 0044b426419d4fee6189e79f240139cb7fb76f7a
3
+ metadata.gz: 1eb5beb837b96c6e0ab922695ec87617e71f1bad
4
+ data.tar.gz: cf3e51606a71b99ef7410025c919fd84106ed3cc
5
5
  SHA512:
6
- metadata.gz: 203001699d0cef653430a2cdc9cbf4b9bc8670377253e4abb2560ae112dc730b747b3b9a08cdc72a5934d43372d6d1e8f2a8b3a5446d1727f1cc5bb97f27e919
7
- data.tar.gz: 3fbf19b756ae0ee62fd35f3b4d0e6e3c751251b8afea2a58620a088390bfbe718e949f06aa8d6ef0f47f41e0ded8f142a48a47eaa71ca1fee5a1d366a5c8fc7d
6
+ metadata.gz: 9f41bd149e09d98034fdafa4419ab2b66e40a991c84aa8aac00f2c1569c95c08cf28ba8a4c087e38290e83fcdbc58261fc2a861a08f356a08d4e27c09d9b0326
7
+ data.tar.gz: 26ff8855e56f5167d14ae11092197fc4e2a2dce3121202d8971adb6f4c42fa8f56a345f28ba43c0e754f36569189ac88ba08f48a6f897952ab9119792779a979
data/CHANGELOG.md CHANGED
@@ -1,9 +1,13 @@
1
1
  # Changelog
2
2
 
3
- ### 1.2.6 - 2015-05-15
3
+ ### 1.2.7 - 2015-06-17
4
+ - Fix: Fixed some erroneous references to site_dir configuration. [#60](https://github.com/octopress/deploy/pull/60)
5
+ - Minor: Moved documentation to [octopress#deploy](https://github.com/octopress/octopress#deploy).
6
+
7
+ ### 1.2.6 - 2015-06-15
4
8
  - Fix: Tell users to build their sites if the build dir doesn't exist.
5
9
 
6
- ### 1.2.5 - 2015-05-15
10
+ ### 1.2.5 - 2015-06-15
7
11
  - Fix: Ensures that deployment git remote is the same as configuration before pushing.
8
12
 
9
13
  ### 1.2.4 - 2015-05-11
data/README.md CHANGED
@@ -15,175 +15,7 @@ $ gem install octopress
15
15
 
16
16
  ## Usage
17
17
 
18
- | Subcommand | Description |
19
- |:--------------------------|:-------------------------------------------------------------------|
20
- | `init <METHOD> [options]` | Generate a config file for the deployment method. (git, s3, rsync) |
21
- | `pull <DIR>` | Pull down your site into a local directory. |
22
- | `add-bucket <NAME>` | (S3 only) Add a bucket using your configured S3 credentials. |
23
-
24
- ## Set up
25
-
26
- First set up a configuration file for your deployment method.
27
-
28
- ```
29
- $ octopress deploy init git git@github.com:user/project
30
- $ octopress deploy init s3
31
- $ octopress deploy init rsync
32
- ```
33
-
34
- This will generate a `_deploy.yml` file in your current
35
- directory which you can edit to add any necessary configuration.
36
- **Remember to add your configuration to `.gitignore` to be sure
37
- you never commit sensitive information to your repository.**
38
-
39
- You can pass configurations as command line options. To see specific options for any method, add the `--help` flag.
40
- For example to see the options for configuring S3:
41
-
42
- ```
43
- $ octopress deploy init s3 --help
44
- ```
45
-
46
- ## Deploying your site.
47
-
48
- Deployment is tailored to work with Jekyll, but it will work for
49
- any static site. Simply make sure your configuration points to
50
- the root directory of your static site (For Jekyll, that's
51
- probably `_site`) then tell Octopress to deploy it.
52
-
53
- ```
54
- $ octopress deploy
55
- ```
56
-
57
- This will read your `_deploy.yml` configuration and deploy your
58
- site. If you like, you can specify a configuration file.
59
-
60
- ```
61
- $ octopress deploy --config _staging.yml
62
- ```
63
-
64
- ## Pull down your site
65
-
66
- With the `pull` command, you can pull your site down into a local directory.
67
-
68
- ```
69
- $ octopress deploy pull <DIR>
70
- ```
71
-
72
- Mainly you'd do this if you're troubleshooting deployment and you want to see if it's working how you expected.
73
-
74
- ## Amazon S3 Deployment Configuration
75
-
76
- To deploy with Amazon S3 you will need to install the [aws-sdk-v1 gem](https://rubygems.org/gems/aws-sdk-v1).
77
-
78
- Important: when using S3, you must add your `_deploy.yml` to your .gitignore to prevent accidentally sharing
79
- account access information.
80
-
81
- | Config | Description | Default
82
- |:--------------------|:------------------------------------------------------|:-------------|
83
- | `method` | Deployment method, in this case use 's3' | |
84
- | `site_dir` | Path to static site files | _site |
85
- | `bucket_name` | S3 bucket name | |
86
- | `access_key_id` | AWS access key | |
87
- | `secret_access_key` | AWS secret key | |
88
- | `distribution_id` | [optional] AWS CloudFront distribution id | |
89
- | `remote_path` | Directory files should be synced to. | / |
90
- | `verbose` | [optional] Display all file actions during deploy. | false |
91
- | `incremental` | [optional] Incremental deploy (only updated files) | false |
92
- | `region` | [optional] Region for your AWS bucket | us-east-1 |
93
- | `delete` | Delete files in `remote_path` not found in `site_dir` | false |
94
- | `headers` | Set headers for matched files | [] |
95
-
96
- If you choose a bucket which doesn't yet exist, Octopress Deploy will offer to create it for you, and offer to configure it as a static website.
97
-
98
- If you configure Octopress to delete files, all files found in the `remote_path` on S3 bucket will be removed unless they match local site files.
99
- If `remote_path` is a subdirectory, only files in that subdirectory will be evaluated for deletion.
100
-
101
-
102
- ### S3 Headers
103
-
104
- You can create an array of header congifs to set expiration, content and cache settings for any paths matching the `filename`.
105
-
106
- | Header Config | Description | Default
107
- |:--------------------|:------------------------------------------------------|:-------------|
108
- | `filename` | A regex or a substring of the file to match | |
109
- | `site_dir` | An http date or a number of years or days from now | |
110
- | `content_type` | A string which is passed through to the headers | |
111
- | `content_encoding` | A string which is passed through to the headers | |
112
- | `cache_control` | A string which is passed through to the headers | |
113
-
114
- Here is how you might set expriation and cache controls for CSS and Javascript files.
115
-
116
- ```yaml
117
- headers:
118
- - filename: '^assets.*\.js$'
119
- expires: '+3 years'
120
- cache_control: 'max-age=94608000'
121
- content_type: 'application/javascript'
122
- - filename: '^assets.*\.css$'
123
- expires: '+3 years'
124
- cache_control: 'max-age=94608000'
125
- content_type: 'text/css'
126
- ```
127
-
128
- ### AWS config via ENV
129
-
130
- If you prefer, you can store AWS access credentials in environment variables instead of a configuration file.
131
-
132
- | Config | ENV var |
133
- |:--------------------|:-------------------------------|
134
- | `access_key_id` | AWS_ACCESS_KEY_ID |
135
- | `secret_access_key` | AWS_SECRET_ACCESS_KEY |
136
-
137
- Note: configurations in `_deploy.yml` will override environment variables so be sure to remove those if you decide to use environment variables.
138
-
139
- ### Add a new bucket
140
-
141
- If your AWS credentials are properly configured, you can add a new bucket with this command.
142
-
143
- ```
144
- $ octopress deploy add-bucket <NAME>
145
- ```
146
-
147
- This will connect to AWS, create a new S3 bucket, and configure it for static website hosting. This command can use the settings in your deployment configuration or you can pass options to override those settings.
148
-
149
- | Option | Description | Default
150
- |:--------------|:-------------------------------------------------|:---------------|
151
- | `--region` | Override the `region` configuration | |
152
- | `--index` | Specify an index page for your site | index.html |
153
- | `--error` | Specify an error page for your site | error.html |
154
- | `--config` | Use a custom configuration file | _deploy.yml |
155
-
156
- You'll only need to pass options if you want to override settings in your deploy config file.
157
-
158
- ## Git Deployment Configuration
159
-
160
- Only `git_url` is required. Other options will default as shown below.
161
-
162
- | Config | Description | Default
163
- |:--------------|:-------------------------------------------------|:---------------|
164
- | `method` | Deployment method, in this case use 'git' | |
165
- | `site_dir` | Path to static site files | _site |
166
- | `git_url` | Url for remote git repository | |
167
- | `git_branch` | Deployment branch for git repository | master |
168
- | `deploy_dir` | Directory where deployment files are staged | .deploy |
169
- | `remote` | Name of git remote | deploy |
170
-
171
- ## Rsync Deployment Configuration
172
-
173
- | Config | Description | Default
174
- |:---------------|:--------------------------------------------------|:---------------|
175
- | `method` | Deployment method, in this case use 'rsync' | |
176
- | `site_dir` | Path to static site files | _site |
177
- | `user` | ssh user, e.g user@host.com | |
178
- | `port` | ssh port | 22 |
179
- | `remote_path` | Remote destination's document root | |
180
- | `exclude_from` | Path to a file containing rsync exclusions | |
181
- | `exclude` | Inline list of rsync exclusions | |
182
- | `include_from` | Path to a file containing rsync inclusions | |
183
- | `include` | Inline list of inclusions to override exclusions | |
184
- | `delete` | Delete files in destination not found in source | false |
185
-
186
- You can rsync to a local directory by configuring `remote_path` and leaving off `user` and `port`.
18
+ For usage instructions, please refer to [octopress](https://github.com/octopress/octopress#deploy).
187
19
 
188
20
  ## Contributing
189
21
 
@@ -145,12 +145,3 @@ FILE
145
145
 
146
146
  end
147
147
  end
148
-
149
- Octopress::Docs.add({
150
- name: "Octopress Deploy",
151
- gem: "octopress-deploy",
152
- version: Octopress::Deploy::VERSION,
153
- description: "Easily deploy any static site using S3, Git or Rsync.",
154
- path: File.expand_path(File.join(File.dirname(__FILE__), "../")),
155
- source_url: "https://github.com/octopress/deploy",
156
- })
@@ -9,7 +9,7 @@ module Octopress
9
9
  @remote = @options[:remote] || 'deploy'
10
10
  @remote_path = @options[:remote_path] || ''
11
11
  @remote_path = @remote_path.sub(/^\//,'') #remove leading slash
12
- @site_dir = File.expand_path(@options[:site_dir] || '_site')
12
+ @local = File.expand_path(@options[:site_dir] || '_site')
13
13
  @deploy_dir = File.expand_path(@options[:deploy_dir] || '.deploy')
14
14
  @pull_dir = @options[:dir]
15
15
  abort "Deploy Failed: Configure a git_url in #{@options[:config_file]} before deploying.".red if @repo.nil?
@@ -18,10 +18,10 @@ module Octopress
18
18
  # Initialize, pull, copy and deploy.
19
19
  #
20
20
  def push
21
- if File.exist?(@site_dir)
21
+ if File.exist?(@local)
22
22
  check_branch
23
23
  init_repo
24
- puts "Syncing #{@site_dir.sub(Dir.pwd.strip+'/', '')} files to #{@repo}."
24
+ puts "Syncing #{@local.sub(Dir.pwd.strip+'/', '')} files to #{@repo}."
25
25
  FileUtils.cd @deploy_dir do
26
26
  git_pull
27
27
  clean_deploy
@@ -29,7 +29,7 @@ module Octopress
29
29
  git_push
30
30
  end
31
31
  else
32
- abort "Cannot find site build at #{@site_dir}. Be sure to build your site first."
32
+ abort "Cannot find site build at #{@local}. Be sure to build your site first."
33
33
  end
34
34
  end
35
35
 
@@ -47,7 +47,7 @@ module Octopress
47
47
  end
48
48
 
49
49
  if same_remote && same_branch
50
- puts "Deploy to #{@branch} canceled:".red
50
+ puts "Deploy to #{@branch} canceled:".red
51
51
  puts "You cannot deploy to the same branch you are working in. This will overwrite the source for your site.\n"
52
52
  puts "First, back up your site's source to a branch:"
53
53
  puts "\n git checkout -b source".yellow
@@ -152,7 +152,7 @@ CONFIG
152
152
  #
153
153
  def copy_site
154
154
  target_dir = File.join(@deploy_dir, @remote_path).sub(/\/$/,'')
155
- FileUtils.cp_r @site_dir + '/.', target_dir
155
+ FileUtils.cp_r @local + '/.', target_dir
156
156
  message = "Site updated at: #{Time.now.utc}"
157
157
  `git add --all .`
158
158
  `git commit -m \"#{message}\"`
@@ -20,7 +20,7 @@ module Octopress
20
20
  end
21
21
 
22
22
  def push
23
- if File.exist?(@site_dir)
23
+ if File.exist?(@local)
24
24
  puts "Syncing #{@local} files to #{@remote_path} with rsync."
25
25
  system cmd
26
26
  else
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Deploy
3
- VERSION = "1.2.6"
3
+ VERSION = "1.2.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-16 00:00:00.000000000 Z
11
+ date: 2015-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorator