-
Notifications
You must be signed in to change notification settings - Fork 30
49 lines (38 loc) · 1.12 KB
/
Copy pathpython-app.yml
File metadata and controls
49 lines (38 loc) · 1.12 KB
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
42
43
44
45
46
47
48
49
name: AzureAPI
on:
push:
branches: [ develop ]
env:
resourceGroup: CBTAzure
dnsLabel: cbtazuredns
appName: cbtazureapi92
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: azure/login@v1.1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Azure CLI Action
uses: Azure/cli@v1.0.0
with:
inlineScript: az appservice plan create -g ${{ env.resourceGroup }} -n azureapiplan --is-linux
- name: Azure CLI Action
uses: Azure/cli@v1.0.0
with:
inlineScript: az webapp create -g ${{ env.resourceGroup }} -p azureapiplan -n ${{ env.appName }} --runtime "python|3.6"
- name: Azure WebApp
uses: Azure/webapps-deploy@v2
with:
app-name: ${{ env.appName }}
#package: .
#startup-command: python app.py