From 1f8727e2c7abfce8282c0b4bfe71b9a321697969 Mon Sep 17 00:00:00 2001 From: nailsonseat Date: Tue, 11 Jun 2024 21:26:57 +0530 Subject: [PATCH] Use dart define --- .github/workflows/web.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 9aed828..63cac4b 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -15,20 +15,14 @@ jobs: - name: Set up Flutter uses: subosito/flutter-action@v1 - - - name: Set up .env file - env: - GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} - run: | - echo GEMINI_API_KEY=$GEMINI_API_KEY > .env - - name: Display GEMINI_API_KEY from secrets run: echo ${{ secrets.GEMINI_API_KEY }} - - name: Display GEMINI_API_KEY from .env file - run: cat .env - - name: Deploy to GitHub Pages uses: bluefireteam/flutter-gh-pages@v7 with: baseHref: /Portfolio_Website/ + buildDir: build/web + + - name: Build Flutter web with Dart defines + run: --dart-define GEMINI_API_KEY=${{ secrets.GEMINI_API_KEY }}