Skip to content

Commit

Permalink
auth differently when CI is set
Browse files Browse the repository at this point in the history
  • Loading branch information
acoffman committed Jun 21, 2023
1 parent 0b04dba commit f2cd8fa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 7 additions & 5 deletions server/config/deploy/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

set :linked_files, fetch(:linked_files, []).push('config/master.key')

set :ssh_options, {
keys: [ENV['DGIDB_PROD_KEY']].compact,
forward_agent: false,
auth_methods: %w(publickey)
}
if !ENV['CI']
set :ssh_options, {
keys: [ENV['DGIDB_PROD_KEY']].compact,
forward_agent: false,
auth_methods: %w(publickey)
}
end
12 changes: 7 additions & 5 deletions server/config/deploy/staging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@

set :linked_files, fetch(:linked_files, []).push('config/master.key')

set :ssh_options, {
keys: [ENV['DGIDB_STAGING_KEY']].compact,
forward_agent: false,
auth_methods: %w(publickey)
}
if !ENV['CI']
set :ssh_options, {
keys: [ENV['DGIDB_STAGING_KEY']].compact,
forward_agent: false,
auth_methods: %w(publickey)
}
end

0 comments on commit f2cd8fa

Please sign in to comment.