-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (31 loc) · 1014 Bytes
/
main_test-python-2021.yml
File metadata and controls
39 lines (31 loc) · 1014 Bytes
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
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build and deploy Python app to Azure Web App - test-python-2021
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python version
uses: actions/setup-python@v1
with:
python-version: '3.6'
- name: Install Python dependencies
run: |
python -m venv env
.\env\Scripts\activate
pip install -r requirements.txt
- name: Zip the application files
run: Compress-Archive .\* app.zip
- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v2
with:
app-name: 'test-python-2021'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_752a5e760d154fc6894afd07e6fe316b }}
package: '.\app.zip'