Commit 6ae400d 1 parent f753ede commit 6ae400d Copy full SHA for 6ae400d
File tree 4 files changed +45
-50
lines changed
4 files changed +45
-50
lines changed Original file line number Diff line number Diff line change @@ -21,3 +21,4 @@ gem 'dotenv'
21
21
# For deploy
22
22
gem "aws-sdk"
23
23
gem "middleman-cdn"
24
+ gem 'middleman-s3_sync'
Original file line number Diff line number Diff line change 180
180
listen (3.0.3 )
181
181
rb-fsevent (>= 0.9.3 )
182
182
rb-inotify (>= 0.9 )
183
+ map (6.5.5 )
183
184
maxcdn (0.2.1 )
184
185
curb-fu (~> 0.6.2 )
185
186
signet (~> 0.5.1 )
220
221
middleman-core (>= 3.0.2 )
221
222
multi_json (~> 1.0 )
222
223
rack-livereload
224
+ middleman-s3_sync (3.0.47 )
225
+ ansi (~> 1.5.0 )
226
+ fog-aws (>= 0.1.1 )
227
+ map
228
+ middleman-core (>= 3.0.0 )
229
+ pmap
230
+ ruby-progressbar
231
+ unf
223
232
middleman-sprockets (3.4.2 )
224
233
middleman-core (>= 3.3 )
225
234
sprockets (~> 2.12.1 )
242
251
tilt (~> 1.4.1 )
243
252
padrino-support (0.12.5 )
244
253
activesupport (>= 3.1 )
254
+ pmap (1.0.2 )
245
255
rack (1.6.4 )
246
256
rack-livereload (0.3.16 )
247
257
rack
251
261
rb-inotify (0.9.5 )
252
262
ffi (>= 0.5.0 )
253
263
redcarpet (3.2.2 )
264
+ ruby-progressbar (1.7.5 )
254
265
sass (3.4.18 )
255
266
signet (0.5.1 )
256
267
addressable (>= 2.2.3 )
276
287
uglifier (2.7.2 )
277
288
execjs (>= 0.3.0 )
278
289
json (>= 1.8.0 )
290
+ unf (0.1.4 )
291
+ unf_ext
292
+ unf_ext (0.0.7.1 )
279
293
xpath (2.0.0 )
280
294
nokogiri (~> 1.3 )
281
295
@@ -288,6 +302,7 @@ DEPENDENCIES
288
302
middleman (~> 3.4.0 )
289
303
middleman-cdn
290
304
middleman-livereload (~> 3.1.0 )
305
+ middleman-s3_sync
291
306
redcarpet
292
307
tzinfo-data
293
308
wdm (~> 0.1.0 )
Original file line number Diff line number Diff line change 1
1
require 'dotenv'
2
2
Dotenv . load
3
3
4
- require "lib/deploy"
5
-
6
4
activate :directory_indexes
7
5
8
6
set :haml , { ugly : true , format : :html5 }
24
22
25
23
set :images_dir , 'images'
26
24
25
+ activate :s3_sync do |s3_sync |
26
+ s3_sync . bucket = 'www.sicpdistilled.com'
27
+ s3_sync . region = 'eu-west-1'
28
+ s3_sync . delete = false
29
+ s3_sync . after_build = true
30
+ s3_sync . prefer_gzip = true
31
+ s3_sync . path_style = true
32
+ s3_sync . reduced_redundancy_storage = false
33
+ s3_sync . acl = 'public-read'
34
+ s3_sync . encryption = false
35
+ s3_sync . prefix = ''
36
+ s3_sync . version_bucket = false
37
+ end
38
+
27
39
configure :build do
28
40
activate :minify_css
29
41
activate :minify_javascript
30
- activate :s3_deploy
31
42
activate :asset_hash
32
43
33
- activate :cdn do |cdn |
34
- cdn . cloudflare = {
35
- zone : 'sicpdistilled.com' ,
36
- base_urls : [
37
- 'https://www.sicpdistilled.com'
38
- ]
39
- }
40
- end
41
44
end
42
45
46
+ activate :cdn do |cdn |
47
+ cdn . cloudflare = {
48
+
49
+ zone : 'sicpdistilled.com' ,
50
+ base_urls : [
51
+ 'http://www.sicpdistilled.com'
52
+ ]
53
+ }
54
+ end
55
+
56
+ after_s3_sync do |files_by_status |
57
+ cdn_invalidate ( files_by_status [ :updated ] )
58
+ end
59
+
60
+
43
61
# ready do
44
62
# # proxy "/section/welcome", "/index.html"
45
63
# %w[0.1 1.1 1.2 2.1 2.2.4].each do |id|
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments