Skip to content

Commit 15069b6

Browse files
committed
creare a .env file
1 parent 4750719 commit 15069b6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/workflows/master.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
- master
66
env:
77
DATABASE_URL: ${{ secrets.DATABASE_URL }}
8-
VITE_CLERK_PUBLISHABLE_KEY: ${{ secrets.VITE_CLERK_PUBLISHABLE_KEY }}
98
jobs:
109
deploy:
1110
runs-on: ubuntu-latest
@@ -15,6 +14,8 @@ jobs:
1514
- uses: actions/checkout@v4
1615
- uses: oven-sh/setup-bun@v2
1716
- run: bun install
17+
- name: Generate .env File
18+
run: echo "VITE_CLERK_PUBLISHABLE_KEY=${{ secrets.VITE_CLERK_PUBLISHABLE_KEY }}" > .env
1819
- name: Build Project
1920
run: bun run build
2021
- name: Run Tests
@@ -27,5 +28,3 @@ jobs:
2728
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
2829
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
2930
packageManager: bun
30-
env:
31-
VITE_CLERK_PUBLISHABLE_KEY: ${{ secrets.VITE_CLERK_PUBLISHABLE_KEY }}

src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ declare module "@tanstack/react-router" {
1919
}
2020

2121
// Import your Publishable Key
22-
const PUBLISHABLE_KEY = process.env.VITE_CLERK_PUBLISHABLE_KEY
22+
const PUBLISHABLE_KEY = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY
2323

2424
if (!PUBLISHABLE_KEY) {
2525
throw new Error('Add your Clerk Publishable Key to the .env file')

0 commit comments

Comments
 (0)