Skip to content

Commit

Permalink
Add REACT_APP_API_URL environment variable & remove non-prod dependen…
Browse files Browse the repository at this point in the history
…cies
  • Loading branch information
Lujia-Cheng committed Mar 20, 2024
1 parent 3b91d51 commit ec521bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/frontend-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
"@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",
"react-scripts": "5.0.1",
"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",
Expand Down

0 comments on commit ec521bb

Please sign in to comment.