Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

Commit 4c61e78

Browse files
committed
Merge pull request rspec#60 from rspec/staging_no_cname
No CNAME for staging.
2 parents 53ed46f + eb48295 commit 4c61e78

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

config.rb

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,13 @@
1414
blog.layout = "blog_post"
1515

1616
blog.permalink = "/{year}/{month}/{title}"
17-
# Matcher for blog source files
18-
# blog.sources = "{year}-{month}-{day}-{title}.html"
19-
# blog.taglink = "tags/{tag}.html"
20-
# blog.summary_separator = /(READMORE)/
21-
# blog.summary_length = 250
22-
# blog.year_link = "{year}.html"
23-
# blog.month_link = "{year}/{month}.html"
24-
# blog.day_link = "{year}/{month}/{day}.html"
25-
# blog.default_extension = ".markdown"
2617

2718
blog.tag_template = "tag.html"
2819
blog.calendar_template = "calendar.html"
2920

3021
# Enable pagination
3122
blog.paginate = true
3223
blog.per_page = 10
33-
# blog.page_link = "page/{num}"
3424
end
3525

3626
page "/blog/feed.xml", layout: false
@@ -89,19 +79,23 @@
8979
}
9080
end
9181

92-
activate :deploy do |deploy|
93-
deploy.method = :git
94-
deploy.build_before = true
95-
deploy.branch = 'master'
96-
97-
case ENV['TARGET'].to_s
98-
when /prod/i
99-
deploy.remote = 'git@github.com:rspec/rspec.github.io.git'
100-
else
101-
deploy.remote = 'git@github.com:RSpec-Staging/rspec-staging.github.io.git'
82+
def deploy_to target
83+
activate :deploy do |deploy|
84+
deploy.method = :git
85+
deploy.build_before = true
86+
deploy.branch = 'master'
87+
deploy.remote = target
10288
end
10389
end
10490

91+
case ENV['TARGET'].to_s
92+
when /prod/i
93+
deploy_to 'git@github.com:rspec/rspec.github.io.git'
94+
else
95+
deploy_to 'git@github.com:RSpec-Staging/rspec-staging.github.io.git'
96+
ignore 'CNAME'
97+
end
98+
10599
helpers do
106100
def primary_page_class
107101
page_classes.split(" ").first

0 commit comments

Comments
 (0)