diff --git a/.github/workflows/main_demo-backend-flask.yml b/.github/workflows/main_demo-backend-flask.yml new file mode 100644 index 000000000..a3280038b --- /dev/null +++ b/.github/workflows/main_demo-backend-flask.yml @@ -0,0 +1,38 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: 'Build and deploy Python app to Azure Web App: demo-backend-flask' + +on: + push: + branches: + - main + workflow_dispatch: + +env: + AZURE_WEBAPP_NAME: demo-backend-flask + PYTHON_VERSION: "3.11" + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python version + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Build using AppService-Build + uses: azure/appservice-build@v3 + with: + platform: python + platform-version: ${{ env.PYTHON_VERSION }} + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v3 + with: + app-name: ${{ env.AZURE_WEBAPP_NAME }} + publish-profile: ${{ secrets.AzureAppService_PublishProfile_2a585577347f4d46909d198cb4b682b9 }}