diff --git a/.github/workflows/azure-static-web-apps-backend.yml b/.github/workflows/azure-static-web-apps-backend.yml index 5e8de57..909fcff 100644 --- a/.github/workflows/azure-static-web-apps-backend.yml +++ b/.github/workflows/azure-static-web-apps-backend.yml @@ -15,7 +15,7 @@ on: env: AZURE_FUNCTIONAPP_NAME: enterprise-gpt-backend # set this to your application's name AZURE_FUNCTIONAPP_PACKAGE_PATH: 'app/backend' # set this to the path to your web app project, defaults to the repository root - PYTHON_VERSION: '3.10' # set this to the Python version to use (supports 3.6, 3.7, 3.8) + DOTNET_VERSION: '8.0.x' # set this to the dotnet version to use (e.g. '2.1.x', '3.1.x', '5.0.x') jobs: build_and_deploy_job: @@ -23,26 +23,25 @@ jobs: runs-on: ubuntu-latest name: Build and Deploy Job steps: - - uses: actions/checkout@v2 - with: - submodules: true + - name: 'Checkout GitHub Action' + uses: actions/checkout@v3 - - name: Setup Python ${{ env.PYTHON_VERSION }} Environment - uses: actions/setup-python@v1 - with: - python-version: ${{ env.PYTHON_VERSION }} + - name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} - - name: 'Resolve Project Dependencies Using Pip' - shell: bash - run: | - pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}' - python -m pip install --upgrade pip - pip install -r requirements.txt --target=".python_packages/lib/site-packages" - popd + - name: 'Resolve Project Dependencies Using Dotnet' + shell: bash + run: | + pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}' + dotnet build --configuration Release --output ./output + popd - - name: 'Run Azure Functions action' - uses: Azure/functions-action@v1 - with: - app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }} - package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }} - publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }} \ No newline at end of file + - name: 'Run Azure Functions Action' + uses: Azure/functions-action@v1 + id: fa + with: + app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }} + package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output' + publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }} \ No newline at end of file