Skip to content

Commit 5a01197

Browse files
committed
Add or update the Azure App Service build and deployment workflow config
1 parent 482fc4b commit 5a01197

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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 - QuickyAdminChurn
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read #This is required for actions/checkout
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Python version
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.10'
26+
27+
- name: Create and start virtual environment
28+
run: |
29+
python -m venv venv
30+
source venv/bin/activate
31+
32+
- name: Install dependencies
33+
run: pip install -r requirements.txt
34+
35+
# Optional: Add step to run tests here (PyTest, Django test suites, etc.)
36+
37+
- name: Upload artifact for deployment jobs
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: python-app
41+
path: |
42+
.
43+
!venv/
44+
45+
deploy:
46+
runs-on: ubuntu-latest
47+
needs: build
48+
49+
steps:
50+
- name: Download artifact from build job
51+
uses: actions/download-artifact@v4
52+
with:
53+
name: python-app
54+
55+
- name: 'Deploy to Azure Web App'
56+
uses: azure/webapps-deploy@v3
57+
id: deploy-to-webapp
58+
with:
59+
app-name: 'QuickyAdminChurn'
60+
slot-name: 'Production'
61+
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_0E5F77DD0CBA49039DB57598F5AB38E3 }}

0 commit comments

Comments
 (0)