diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index c4cc34bf..d9226881 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -22,6 +22,9 @@ jobs: SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} # The project ID for linking the Supabase CLI. SUPABASE_PROJECT_ID: ${{ secrets.SUPABASE_PROJECT_ID }} + # The Google GenAI API key, prefixed for Vite. + # By defining it here, it's available to all steps in the job. + VITE_API_KEY: ${{ secrets.VITE_API_KEY }} steps: - name: Checkout Code @@ -64,16 +67,13 @@ jobs: # Debug step: Verify environment variables are present before build - name: Debug Environment Variables + # This will now correctly check the job-level environment variable. run: | echo "VITE_API_KEY is set: ${{ env.VITE_API_KEY != '' }}" # --- Frontend Deployment --- - name: Build React Application - env: - # Pass the Google GenAI API key to the build process. - # Vite automatically makes env vars prefixed with VITE_ available in the app. The app expects VITE_API_KEY. - VITE_API_KEY: ${{ secrets.VITE_API_KEY }} - run: npm run build # This creates the 'dist' directory with static files. + run: npm run build # This creates the 'dist' directory. Vite will automatically pick up VITE_API_KEY from the job environment. - name: Deploy Frontend via Local Copy run: | diff --git a/tailwind.config.js b/tailwind.config.js index 0ecd151c..edb3eb22 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -3,7 +3,7 @@ export default { // Configure files to scan for Tailwind classes content: [ "./index.html", - "./**/*.{js,ts,jsx,tsx}", // Scans all relevant files for classes + "./src/**/*.{js,ts,jsx,tsx}", // Scans only files in the 'src' directory ], // Enable dark mode using a class darkMode: 'class',