File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Django to Azure
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ env :
9+ AZURE_WEBAPP_NAME : hirecleo-app # Ditt appnamn i Azure
10+ AZURE_WEBAPP_PACKAGE_PATH : . # Roten av projektet
11+ PYTHON_VERSION : " 3.12"
12+
13+ jobs :
14+ build-and-deploy :
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - name : 📥 Check out repo
19+ uses : actions/checkout@v3
20+
21+ - name : 🐍 Set up Python ${{ env.PYTHON_VERSION }}
22+ uses : actions/setup-python@v5
23+ with :
24+ python-version : ${{ env.PYTHON_VERSION }}
25+
26+ - name : 📦 Install dependencies
27+ run : |
28+ python -m pip install --upgrade pip
29+ pip install -r requirements.txt
30+
31+ - name : 🔧 Collect static files
32+ run : |
33+ python manage.py collectstatic --noinput
34+
35+ - name : ⚙️ Run migrations
36+ run : |
37+ python manage.py migrate --noinput
38+
39+ - name : 🚀 Deploy to Azure Web App
40+ uses : azure/webapps-deploy@v2
41+ with :
42+ app-name : ${{ env.AZURE_WEBAPP_NAME }}
43+ slot-name : Production
44+ publish-profile : ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE }}
45+ package : ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
You can’t perform that action at this time.
0 commit comments