Skip to content

Commit

Permalink
update deploy steps to use RAILS_MASTER_KEY
Browse files Browse the repository at this point in the history
  • Loading branch information
mpressen committed Nov 18, 2024
1 parent b5472d0 commit dbb69f1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:

- name: Run tests
env:
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
RAILS_ENV: test
# REDIS_URL: redis://localhost:6379/0
run: bin/rails db:test:prepare test test:system
Expand Down
23 changes: 13 additions & 10 deletions config/initializers/mailjet.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# kindly generated by appropriated Rails generator
Mailjet.configure do |config|
config.api_key = Rails.application.credentials.mailjet[:api_key]
config.secret_key = Rails.application.credentials.mailjet[:secret_key]
config.default_from = "[email protected]"
# Mailjet API v3.1 is at the moment limited to Send API.
# We’ve not set the version to it directly since there is no other endpoint in that version.
# We recommend you create a dedicated instance of the wrapper set with it to send your emails.
# If you're only using the gem to send emails, then you can safely set it to this version.
# Otherwise, you can remove the dedicated line into config/initializers/mailjet.rb.
config.api_version = "v3.1"

if Rails.application.credentials.mailjet.present?
Mailjet.configure do |config|
config.api_key = Rails.application.credentials.mailjet.api_key
config.secret_key = Rails.application.credentials.mailjet.secret_key
config.default_from = "[email protected]"
# Mailjet API v3.1 is at the moment limited to Send API.
# We’ve not set the version to it directly since there is no other endpoint in that version.
# We recommend you create a dedicated instance of the wrapper set with it to send your emails.
# If you're only using the gem to send emails, then you can safely set it to this version.
# Otherwise, you can remove the dedicated line into config/initializers/mailjet.rb.
config.api_version = "v3.1"
end
end

0 comments on commit dbb69f1

Please sign in to comment.