Merge pull request #98 from undpindia/feature-mobileview #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |