File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Expand file tree Collapse file tree 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 - web-app-japan-east
6+
7+ on :
8+ push :
9+ branches :
10+ - main
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.9'
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 : ' web-app-japan-east'
62+ slot-name : ' Production'
63+ publish-profile : ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_C443FF54C06D4233AB28E4CBFC8FD2DD }}
You can’t perform that action at this time.
0 commit comments