From b88f17a621ca492cda5220993057ec5c8288b113 Mon Sep 17 00:00:00 2001 From: aliamerj Date: Sat, 9 Mar 2024 17:13:55 +0300 Subject: [PATCH] fix env files --- .github/workflows/main.yml | 2 -- app/api/auth/[...nextauth]/route.ts | 4 ++-- utils/aws/s3_bucket.ts | 10 +++++----- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6762fb6..fe2cf57 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,10 +1,8 @@ name: ci - on: push: branches: - main - jobs: build: runs-on: ubuntu-latest diff --git a/app/api/auth/[...nextauth]/route.ts b/app/api/auth/[...nextauth]/route.ts index aa881af..fa35032 100644 --- a/app/api/auth/[...nextauth]/route.ts +++ b/app/api/auth/[...nextauth]/route.ts @@ -62,8 +62,8 @@ export const authOptions: NextAuthOptions = { }, }), GithubProvider({ - clientId: env.GITHUB_ID!, - clientSecret: env.GITHUB_SECRET!, + clientId: env.AUTH_GITHUB_ID!, + clientSecret: env.AUTH_GITHUB_SECRET!, profile(profile: GithubProfile) { console.log({profile}) return { diff --git a/utils/aws/s3_bucket.ts b/utils/aws/s3_bucket.ts index c2edd3d..8378d36 100644 --- a/utils/aws/s3_bucket.ts +++ b/utils/aws/s3_bucket.ts @@ -5,10 +5,10 @@ import { } from "@aws-sdk/client-s3"; export const s3 = new S3Client({ - region: process.env.AWS_S3_REGIN!, + region: process.env.S3_REGIN!, credentials: { - accessKeyId: process.env.AWS_IAM_KEY!, - secretAccessKey: process.env.AWS_IAM_SECRET!, + accessKeyId: process.env.IAM_KEY!, + secretAccessKey: process.env.IAM_SECRET!, }, }); @@ -19,7 +19,7 @@ export const uploadProjectLogo = ( userId: string, ) => new PutObjectCommand({ - Bucket: process.env.AWS_S3_NAME!, + Bucket: process.env.S3_NAME!, ContentType: fileType, ContentLength: size, Key: logoName, @@ -29,6 +29,6 @@ export const uploadProjectLogo = ( }); export const deleteProjectLogo = (logoName: string) => new DeleteObjectCommand({ - Bucket: process.env.AWS_S3_NAME!, + Bucket: process.env.S3_NAME!, Key: logoName, });