make dot env file on build
Gitea/subman-nextjs/pipeline/head This commit looks good Details

This commit is contained in:
andrzej 2024-10-04 15:11:59 +02:00
parent 885f5cd56c
commit e32df99446
2 changed files with 2 additions and 4 deletions

2
Jenkinsfile vendored
View File

@ -7,6 +7,8 @@ agent any
stages{
stage('build'){
steps{
sh 'echo "JWT_SECRET=${JWT_SECRET}" | cat >> .env'
sh 'echo "DATABASE_URL=${DATABASE_URL}" | cat >> .env'
sh 'npm install'
sh 'npm run build'
}

View File

@ -3,10 +3,6 @@ import prisma from 'app/lib/db';
import { jwtVerify, JWTPayload, decodeJwt, SignJWT } from 'jose';
import { cookies } from 'next/headers';
import { loginSchema, LoginSchema } from 'app/login/schema';
import { loadEnvConfig } from '@next/env'
const projectDir = process.cwd()
loadEnvConfig(projectDir)