Skip to content

Merge pull request #101 from undpindia/feature-mobileview #25

Merge pull request #101 from undpindia/feature-mobileview

Merge pull request #101 from undpindia/feature-mobileview #25

Workflow file for this run

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'