Skip to content

chore (deploy): use constraints as reqs #14

chore (deploy): use constraints as reqs

chore (deploy): use constraints as reqs #14

Workflow file for this run

name: Deploy app to Azure
# Configures this workflow to run every time a change is pushed to the branch called `main`.
on:
push:
branches:
- main
env:
AZURE_WEBAPP_NAME: airflow-reporting
RESOURCE_GROUP: airflow-reporting_group
AZURE_WEBAPP_PACKAGE_PATH: '.'
STARTUP_COMMAND: 'startup.sh'
PYTHON_VERSION: 3.12
# Oryx deploy doesn't recognise constraints
CUSTOM_REQUIREMENTSTXT_PATH: './constraints.txt'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -c constraints.txt
- name: Build web app
uses: azure/appservice-build@v3
with:
platform: python
platform-version: ${{ env.PYTHON_VERSION }}
- name: Deploy web app
uses: azure/webapps-deploy@v3
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
# Not allowed with publish-profile auth
# startup-command: ${{ env.STARTUP_COMMAND }}