From 1c47f084399ebea38999ff51b832ad1f06f7cae2 Mon Sep 17 00:00:00 2001 From: ADR!AN <111903096+adrianvrj@users.noreply.github.com> Date: Wed, 28 Aug 2024 12:42:31 -0600 Subject: [PATCH 1/4] [CI] fix .env path --- .github/workflows/nextjs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index e4fae2e..bc41a95 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -34,7 +34,7 @@ jobs: uses: SpicyPizza/create-envfile@v1 with: ROOT: https://web3wagers.github.io/gostarkme/ - file_name: frontend/gostarkme-web/.env + file_name: .env # Build job build: From bb5e46fd7361a828654de040998089e548a2d2ab Mon Sep 17 00:00:00 2001 From: ADR!AN <111903096+adrianvrj@users.noreply.github.com> Date: Wed, 28 Aug 2024 12:46:22 -0600 Subject: [PATCH 2/4] [CI] fix creating env file with envkey --- .github/workflows/nextjs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index bc41a95..d589e20 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -33,12 +33,13 @@ jobs: - name: Make envfile uses: SpicyPizza/create-envfile@v1 with: - ROOT: https://web3wagers.github.io/gostarkme/ + envkey_ROOT: https://web3wagers.github.io/gostarkme/ file_name: .env # Build job build: runs-on: ubuntu-latest + needs: create-envfile steps: - name: Checkout uses: actions/checkout@v4 From b3f38b04e0562cb8299007e0fe034a5f77511b43 Mon Sep 17 00:00:00 2001 From: ADR!AN <111903096+adrianvrj@users.noreply.github.com> Date: Wed, 28 Aug 2024 12:49:27 -0600 Subject: [PATCH 3/4] [CI] update Create .Env File GitHub Action version --- .github/workflows/nextjs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index d589e20..cf4b515 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -31,9 +31,9 @@ jobs: steps: - name: Make envfile - uses: SpicyPizza/create-envfile@v1 + uses: SpicyPizza/create-envfile@v2.0 with: - envkey_ROOT: https://web3wagers.github.io/gostarkme/ + envkey_ROOT: "https://web3wagers.github.io/gostarkme/" file_name: .env # Build job From 04a21944a738778f11428adb89b51e5178559eb3 Mon Sep 17 00:00:00 2001 From: adrianvrj Date: Wed, 28 Aug 2024 13:03:32 -0600 Subject: [PATCH 4/4] [CI] added env var when building with next js --- .github/workflows/nextjs.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index cf4b515..a8fe67b 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -25,21 +25,9 @@ defaults: working-directory: frontend/gostarkme-web jobs: - create-envfile: - - runs-on: ubuntu-latest - - steps: - - name: Make envfile - uses: SpicyPizza/create-envfile@v2.0 - with: - envkey_ROOT: "https://web3wagers.github.io/gostarkme/" - file_name: .env - # Build job build: runs-on: ubuntu-latest - needs: create-envfile steps: - name: Checkout uses: actions/checkout@v4 @@ -86,7 +74,11 @@ jobs: - name: Install dependencies run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} - name: Build with Next.js - run: ${{ steps.detect-package-manager.outputs.runner }} next build + env: + ROOT: ${{ vars.ROOT }} + run: | + echo "ROOT is ${{ vars.ROOT }}" + ${{ steps.detect-package-manager.outputs.runner }} next build - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: