-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.16 KB
/
python.yml
File metadata and controls
46 lines (39 loc) · 1.16 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
on: [push,pull_request]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# checkout the repo
- uses: actions/checkout@master
# Set Python version
- uses: actions/setup-python@v1
with:
python-version: '3.7.x'
architecture: 'x64'
# install dependencies
- name: python install
run: |
sudo apt install python3.6-venv
python3.6 -m venv env
source env/bin/activate
pip3.6 install setuptools
pip3.6 install -r requirements.txt
# Archive built app
- name: archive myapp
run: |
zip -r myapp.zip .
# Azure login
# - uses: azure/login@v1
# with:
# creds: ${{ secrets.AZURE_CREDENTIALS }} # Define secret variable in repository settings as per action documentation
# deploy web app
- uses: azure/webapps-deploy@v1
with:
app-name: rr-app-testing-01-wa # Replace with your app name
publish-profile: ${{ secrets.AZURE_CREDENTIALS }}
package: './myapp.zip'
# Add startup command in app service configuration if required
# Azure logout
#- name: logout
# run: |
# az logout