From df4e48618510dc73f6118307d9b3689e1a79a158 Mon Sep 17 00:00:00 2001 From: Administrator Date: Fri, 13 Dec 2024 11:13:20 -0700 Subject: [PATCH] deploy front to dev --- .github/workflows/build-deploy-frontend.yml | 32 +++++++++++---------- .github/workflows/build-deploy-ocr.yml | 28 +++++++++--------- 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build-deploy-frontend.yml b/.github/workflows/build-deploy-frontend.yml index 48bc5e78..a13c5bcb 100644 --- a/.github/workflows/build-deploy-frontend.yml +++ b/.github/workflows/build-deploy-frontend.yml @@ -1,18 +1,20 @@ name: Build and Deploy Frontend on: - workflow_dispatch: - inputs: - deploy-env: - description: 'The environment to deploy to' - required: true - type: choice - options: - - dev - - demo - storage-account-name: - description: 'After the demo env gets created, copy its blob storage name here' - required: false + push: + branches: test-deploy-middleware + # workflow_dispatch: + # inputs: + # deploy-env: + # description: 'The environment to deploy to' + # required: true + # type: choice + # options: + # - dev + # - demo + # storage-account-name: + # description: 'After the demo env gets created, copy its blob storage name here' + # required: false permissions: id-token: write @@ -26,7 +28,7 @@ jobs: - uses: ./.github/actions/build-frontend name: Build frontend with: - api-endpoint: https://reportvision-middleware-${{ inputs.deploy-env }}.azurewebsites.net/ + api-endpoint: https://reportvision-middleware-dev.azurewebsites.net/ frontend-tarball: ./frontend.tgz frontend-path: ./frontend frontend-build-path: ./frontend/dist/ @@ -35,7 +37,7 @@ jobs: deploy-with-blob-name-optional: name: Deploy runs-on: ubuntu-latest - environment: ${{ inputs.deploy-env }} + environment: dev needs: [build-frontend] steps: - name: Download Artifacts To Job @@ -58,7 +60,7 @@ jobs: shell: bash run: | if [ -z "${{ inputs.storage-account-name }}" ]; then - az storage blob upload-batch --account-name reportvisionfrontend${{ inputs.deploy-env }} -d '$web' -s frontend-deploy/ --overwrite + az storage blob upload-batch --account-name reportvisionfrontenddev -d '$web' -s frontend-deploy/ --overwrite else az storage blob upload-batch --account-name ${{ inputs.storage-account-name }} -d '$web' -s frontend-deploy/ --overwrite fi diff --git a/.github/workflows/build-deploy-ocr.yml b/.github/workflows/build-deploy-ocr.yml index 37219750..8c4064ae 100644 --- a/.github/workflows/build-deploy-ocr.yml +++ b/.github/workflows/build-deploy-ocr.yml @@ -1,20 +1,20 @@ name: Create, publish, deploy a OCR API image on: - push: - branches: test-deploy-middleware - # workflow_dispatch: - # inputs: - # deploy-env: - # description: 'The environment to deploy to' - # required: true - # type: choice - # options: - # - dev - # - demo - # ocr-docker-tag: - # description: 'This is optional if you would like to deploy an already published OCR-API image' - # required: false + # push: + # branches: test-deploy-middleware + workflow_dispatch: + inputs: + deploy-env: + description: 'The environment to deploy to' + required: true + type: choice + options: + - dev + - demo + ocr-docker-tag: + description: 'This is optional if you would like to deploy an already published OCR-API image' + required: false permissions: contents: read