From ec521bb7cbe64b1270f6566988da005d31211596 Mon Sep 17 00:00:00 2001 From: Luke Cheng Date: Wed, 20 Mar 2024 17:11:45 -0400 Subject: [PATCH] Add REACT_APP_API_URL environment variable & remove non-prod dependencies --- .github/workflows/frontend-deploy.yml | 8 +++----- frontend/package.json | 8 ++++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/frontend-deploy.yml b/.github/workflows/frontend-deploy.yml index e8a1390..93109d5 100644 --- a/.github/workflows/frontend-deploy.yml +++ b/.github/workflows/frontend-deploy.yml @@ -11,6 +11,8 @@ jobs: working-directory: ./frontend runs-on: ubuntu-latest + env: + REACT_APP_API_URL: ${{ vars.REACT_APP_API_URL }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -35,14 +37,10 @@ jobs: - name: Check api variables run: | echo "Missing REACT_APP_API_URL environment variable" - echo REACT_APP_API_URL: ${{ vars.REACT_APP_API_URL }} - env: - REACT_APP_API_URL: ${{ vars.REACT_APP_API_URL }} + echo REACT_APP_API_URL: ${{ env.REACT_APP_API_URL }} - name: Build react to webpage run: npm run build - env: - REACT_APP_API_URL: ${{ vars.REACT_APP_API_URL }} - name: Upload built files as artifact uses: actions/upload-pages-artifact@v3 diff --git a/frontend/package.json b/frontend/package.json index 05f21ce..9eb48e9 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -8,10 +8,6 @@ "@emotion/styled": "^11.11.0", "@mui/icons-material": "*", "@mui/material": "^5.15.2", - "@types/jest": "^29.5.12", - "@types/node": "^20.11.16", - "@types/react": "^18.2.55", - "@types/react-dom": "^18.2.18", "react": "^18.2.0", "react-dom": "^18.2.0", "react-markdown": "^9.0.1", @@ -19,6 +15,10 @@ "web-vitals": "^2.1.4" }, "devDependencies": { + "@types/jest": "^29.5.12", + "@types/node": "^20.11.16", + "@types/react": "^18.2.55", + "@types/react-dom": "^18.2.18", "@react-buddy/ide-toolbox": "^2.4.0", "@react-buddy/palette-mui": "^5.0.1", "@testing-library/jest-dom": "^5.17.0",