Azure/functions-action

Function app deployment causes internal server error

austinh123123 opened this issue · 2 comments

Hello, I have a python 3.9 function app. I tried to automate its deployment with this action, only to be met with internal server errors or CORS errors after deployment. The curious this is; I can deploy with the VScode extension and all the code runs fine. I'm not sure if I have an error in configuration.
For reference, I've added the action yaml, host.json, and function.json (there's only one function).
deploy.yaml:

name: Deploy python function app to Azure Function App

on:
push:
branches:
- master
env:
AZURE_FUNCTIONAPP_NAME: 'APP_NAME' # I set this but changed it in for the issue
AZURE_FUNCTIONAPP_PACKAGE_PATH: '' # set this to the path to your function app project, defaults to the repository root

jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: dev
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v3
- name: Setup Python 3.9 Environment
uses: actions/setup-python@v1
with:
python-version: 3.9
- 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: 'Azure login'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
publish-profile: ${{ secrets.PUBLISH_PROFILE }}
respect-funcignore: true

host.json:
{ "version": "2.0", "logging": { "applicationInsights": { "samplingSettings": { "isEnabled": true, "excludedTypes": "Request" } } }, "extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle", "version": "[3.*, 4.0.0)" } }

function.json:
{ "scriptFile": "__init__.py", "bindings": [ { "authLevel": "anonymous", "type": "httpTrigger", "direction": "in", "name": "req", "methods": [ "get", "post" ] }, { "type": "http", "direction": "out", "name": "$return" } ] }

This issue is idle because it has been open for 14 days with no activity.

@austinh123123 Is this function app on Linux consumption sku? Also, please share the exact error message.