Skip to content

Commit

Permalink
Refactor: Added the resend api key in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
joywin2003 committed Sep 16, 2024
1 parent adefa09 commit c81da52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ jobs:
echo "GOOGLE_SECRET is set: ${{ env.GOOGLE_SECRET != '' }}"
echo "TURSO_AUTH_TOKEN is set: ${{ env.TURSO_AUTH_TOKEN != '' }}"
echo "TURSO_DATABASE_URL is set: ${{ env.TURSO_DATABASE_URL != '' }}"
echo "RESEND_API_KEY" is set ${{ env.RESEND_API_KEY != '' }}
env:
NEXT_PUBLIC_SITE_URL: ${{ secrets.NEXT_PUBLIC_SITE_URL }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
GOOGLE_ID: ${{ secrets.GOOGLE_ID }}
GOOGLE_SECRET: ${{ secrets.GOOGLE_SECRET }}
TURSO_AUTH_TOKEN: ${{ secrets.TURSO_AUTH_TOKEN }}
TURSO_DATABASE_URL: ${{ secrets.TURSO_DATABASE_URL }}
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}

- name: Build project
run: npm run build
Expand All @@ -53,6 +55,7 @@ jobs:
NEXT_PUBLIC_SITE_URL: ${{ secrets.NEXT_PUBLIC_SITE_URL }}
TURSO_AUTH_TOKEN: ${{ secrets.TURSO_AUTH_TOKEN }}
TURSO_DATABASE_URL: ${{ secrets.TURSO_DATABASE_URL }}
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}

- name: Upload build artifacts (optional)
if: always()
Expand Down
3 changes: 2 additions & 1 deletion src/lib/resend-mailer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import { Resend } from "resend";
const resend = new Resend(process.env.RESEND_API_KEY);

export async function MailUsingResend({ email, name, OTP }: SendEmailType) {
console.log(process.env.RESEND_API_KEY);
try {
const mailOptions: ResendEmailOptions = {
from: "Tedx SJEC <tedxsjec@joywincodes.tech>",
from: "Tedx SJEC <conceevo@joywincodes.tech>",
to: email,
subject: "Tedx SJEC - Your OTP for Email Verification",
react: EmailTemplate({
Expand Down

0 comments on commit c81da52

Please sign in to comment.