-
Notifications
You must be signed in to change notification settings - Fork 42
45 lines (41 loc) · 1.3 KB
/
deploytoprod.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
39
40
41
42
43
44
45
name: Deploy DiCRA to Production Server
on:
push:
paths:
- 'src/web_portal/**'
branches:
- main
defaults:
run:
working-directory: ./
env:
NODE_VERSION: '14' # set this to the node version to use
CI: false
jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: npm install & build
run: |
# Build the project, then
# deploy to Azure Web App.
sudo apt-get install unzip
cd ./src/web_portal && unzip package-lock.zip
npm install
npm run build
pwd
env:
REACT_APP_API_KEY: ${{ secrets.GOOGLE_PLACES }}
- name: 'Deploy react app to Azure blob storage'
uses: bacongobbler/azure-blob-storage-upload@main
with:
source_dir: '/home/runner/work/dicra/dicra/src/web_portal/build'
container_name: '$web'
connection_string: ${{ secrets.AZURE_DEV }}
sync: 'true'