Skip to content

Commit

Permalink
trying to fix env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
almithani committed Dec 17, 2024
1 parent 28ed6ab commit 173eb87
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,14 @@ jobs:
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Verify env variables
run: |
echo "Checking for environment variables..."
echo "ALCHEMY_API_KEY exists: ${{ secrets.VITE_ALCHEMY_API_KEY != '' }}"
- name: Build
run: npm run build
env:
NODE_ENV: production
VITE_ARBITRUM_ALCHEMY_API_KEY: ${{ secrets.VITE_ARBITRUM_ALCHEMY_API_KEY }}
VITE_BASE_ALCHEMY_API_KEY: ${{ secrets.VITE_BASE_ALCHEMY_API_KEY }}
VITE_OP_ALCHEMY_API_KEY: ${{ secrets.VITE_OP_ALCHEMY_API_KEY }}
VITE_MATIC_ALCHEMY_API_KEY: ${{ secrets.VITE_MATIC_ALCHEMY_API_KEY }}
VITE_ETH_ALCHEMY_API_KEY: ${{ secrets.VITE_ETH_ALCHEMY_API_KEY }}
VITE_ALCHEMY_API_KEY: ${{ secrets.VITE_ALCHEMY_API_KEY }}
VITE_ELASTIC_EMAIL_PASSWORD: ${{ secrets.VITE_ELASTIC_EMAIL_PASSWORD }}
VITE_ELASTICMAIL_SECURETOKEN: ${{ secrets.VITE_ELASTICMAIL_SECURETOKEN }}
Expand Down
14 changes: 7 additions & 7 deletions src/data/env.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// testing env vars
// console.log(import.meta.env);
console.log('Environment variables check:');
console.log('ETH_ALCHEMY_API_KEY exists:', !!import.meta.env.VITE_ETH_ALCHEMY_API_KEY);
console.log('MATIC_ALCHEMY_API_KEY exists:', !!import.meta.env.VITE_MATIC_ALCHEMY_API_KEY);
console.log('OP_ALCHEMY_API_KEY exists:', !!import.meta.env.VITE_OP_ALCHEMY_API_KEY);
console.log('ARBITRUM_ALCHEMY_API_KEY exists:', !!import.meta.env.VITE_ARBITRUM_ALCHEMY_API_KEY);
console.log('BASE_ALCHEMY_API_KEY exists:', !!import.meta.env.VITE_BASE_ALCHEMY_API_KEY);

export const REACT_APP_ALCHEMY_API_KEY = import.meta.env.VITE_REACT_APP_ALCHEMY_API_KEY
export const ELASTICMAIL_SECURETOKEN = import.meta.env.VITE_ELASTICMAIL_SECURETOKEN

export const CONVERT_KIT_API_KEY = import.meta.env.VITE_CONVERT_KIT_API_KEY;
export const CONVERT_KIT_FORM_ID = import.meta.env.VITE_CONVERT_KIT_FORM_ID;

export const ALCHEMY_API_KEY = import.meta.env.VITE_ALCHEMY_API_KEY;
export const ETH_ALCHEMY_API_KEY = import.meta.env.VITE_ETH_ALCHEMY_API_KEY;
export const MATIC_ALCHEMY_API_KEY = import.meta.env.VITE_MATIC_ALCHEMY_API_KEY;
export const OP_ALCHEMY_API_KEY = import.meta.env.VITE_OP_ALCHEMY_API_KEY;
export const ARBITRUM_ALCHEMY_API_KEY = import.meta.env.VITE_ARBITRUM_ALCHEMY_API_KEY;
export const BASE_ALCHEMY_API_KEY = import.meta.env.VITE_BASE_ALCHEMY_API_KEY;
export const ALCHEMY_API_KEY = import.meta.env.VITE_ALCHEMY_API_KEY;

export const CG_API_KEY = import.meta.env.VITE_CG_API_KEY; // coingecko API key for pricing history lookups
export const CG_API_URL = import.meta.env.VITE_CG_API_URL; // coingecko API url for pricing history lookups

0 comments on commit 173eb87

Please sign in to comment.