the error message is clear that jwt package is not installed. say if you already have it in the requirements.txt
then the issue is the github yamp pipeline. the build step activated virtual env and installed packages into the virtual env. however, your zip step excludes these venv/*. this is the reason the python packages do not exist when you invoke the http trigger.
- name: Create and start virtual environment
run: |
python -m venv venv
source venv/bin/activate
- name: Install dependencies
run: pip install -r requirements.txt
# Optional: Add step to run tests here
- name: Zip artifact for deployment
run: zip -r release.zip function_app.py host.json -x "*.txt venv/*" ".git/*" ".github/* *.md .gitignore local.*"
there are a few ways to deploy, we can use this method to test it out first:
func azure functionapp publish <function app name>
once completed, go to the deployment
tab under function app to see the final status to be sure:
it might take 30 seconds for the function to show up in the overview page
once working, you can refer to this guide to setup github action to deploy via pipeline.