-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.21 KB
/
deploy-app.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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
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: Building web app
uses: azure/appservice-build@v3
with:
platform: python
platform-version: ${{ env.PYTHON_VERSION }}
- name: Deploy web App using GH Action azure/webapps-deploy
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 }}