Skip to content

remove purple from action path #1

remove purple from action path

remove purple from action path #1

name: Deploy Python project to Azure Function App
# only run for function app code changes (not docs, test or settings)
on:
push:
branches:
- main
paths:
- 'ingest/src/azure/**'
# CONFIGURATION
# Create the empty Azure Function App FIRST
#
# For help, go to https://github.com/Azure/Actions
#
# 1. Set up the following secrets in your repository:
# AZURE_FUNCTIONAPP_PUBLISH_PROFILE
#
# 2. Change these variables for your configuration:
env:
PURPLE_FUNCTIONAPP_NAME: 'your-app-name' # set this to your function app name on Azure
PURPLE_PACKAGE_PATH: 'ingest/src/azure/' # set this to the path to your function app project, defaults to the repository root
PYTHON_VERSION: '3.11' # set this to the python version to use (e.g. '3.6', '3.7', '3.8')
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: dev
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v3
- name: Setup Python ${{ env.PYTHON_VERSION }} Environment
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: 'Resolve Project Dependencies Using Pip'
shell: bash
run: |
pushd './${{ env.PURPLE_PACKAGE_PATH }}'
python -m pip install --upgrade pip
pip install -r requirements.txt --target=".python_packages/lib/site-packages"
popd
- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1
id: fa
with:
app-name: ${{ env.PURPLE_FUNCTIONAPP_NAME }}
package: ${{ env.PURPLE_PACKAGE_PATH }}
publish-profile: ${{ secrets.PURPLE_PUBLISH_PROFILE }}
scm-do-build-during-deployment: true
enable-oryx-build: true
# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples