This repository was archived by the owner on May 25, 2022. It is now read-only.
File tree 1 file changed +63
-0
lines changed
1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2
+ # More GitHub Actions for Azure: https://github.com/Azure/actions
3
+ # More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions
4
+
5
+ name : Build and deploy Python app to Azure Web App - bizapp001
6
+
7
+ on :
8
+ push :
9
+ branches :
10
+ - master
11
+ workflow_dispatch :
12
+
13
+ jobs :
14
+ build :
15
+ runs-on : ubuntu-latest
16
+
17
+ steps :
18
+ - uses : actions/checkout@v2
19
+
20
+ - name : Set up Python version
21
+ uses : actions/setup-python@v1
22
+ with :
23
+ python-version : ' 3.11'
24
+
25
+ - name : Create and start virtual environment
26
+ run : |
27
+ python -m venv venv
28
+ source venv/bin/activate
29
+
30
+ - name : Install dependencies
31
+ run : pip install -r requirements.txt
32
+
33
+ # Optional: Add step to run tests here (PyTest, Django test suites, etc.)
34
+
35
+ - name : Upload artifact for deployment jobs
36
+ uses : actions/upload-artifact@v2
37
+ with :
38
+ name : python-app
39
+ path : |
40
+ .
41
+ !venv/
42
+
43
+ deploy :
44
+ runs-on : ubuntu-latest
45
+ needs : build
46
+ environment :
47
+ name : ' Production'
48
+ url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
49
+
50
+ steps :
51
+ - name : Download artifact from build job
52
+ uses : actions/download-artifact@v2
53
+ with :
54
+ name : python-app
55
+ path : .
56
+
57
+ - name : ' Deploy to Azure Web App'
58
+ uses : azure/webapps-deploy@v2
59
+ id : deploy-to-webapp
60
+ with :
61
+ app-name : ' bizapp001'
62
+ slot-name : ' Production'
63
+ publish-profile : ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_2356B3BA14D849BCB39A2FD927399CF9 }}
You can’t perform that action at this time.
0 commit comments