-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (30 loc) · 971 Bytes
/
env.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Env Deployment
on:
pull_request:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Set working directory
run: cd ./frontend
- name: Set environment variables for the deployment
run: |
if [ ${{ github.event.pull_request.base.ref }} == 'main' ]; then
echo "REACT_APP_API_URL=https://benchscape.azurewebsites.net/" >> .env
elif [ ${{ github.event.pull_request.base.ref }} == 'integration' ]; then
echo "REACT_APP_API_URL=https://benchscape-integration.azurewebsites.net/" >> .env
fi
- name: Install dependencies and build
run: |
cd ./frontend
npm install --ignore-scripts
npm run build
# Add your deployment steps here