Skip to content

Commit

Permalink
update django workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tsubakimoto committed Sep 23, 2023
1 parent 8bf5d6f commit 3a4a174
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/python-django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ on:
env:
PYTHON_VERSION: '3.11'
WORKING_DIRECTORY: python/django
PACKAGE_NAME: django-app

permissions:
id-token: write
contents: read

jobs:
build-django:
Expand Down Expand Up @@ -38,7 +43,7 @@ jobs:
- name: Upload artifact for deployment jobs
uses: actions/upload-artifact@v2
with:
name: python-app
name: ${{ env.PACKAGE_NAME }}
path: |
./${{ env.WORKING_DIRECTORY }}
!./${{ env.WORKING_DIRECTORY }}/venv/
Expand All @@ -54,13 +59,23 @@ jobs:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: python-app
name: ${{ env.PACKAGE_NAME }}
path: .


- name: Az CLI Login
uses: azure/login@v1
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}

- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v2
id: deploy-to-webapp
with:
app-name: ${{ vars.AZURE_WEBAPP_NAME }}
slot-name: 'Production'
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ${{ env.PACKAGE_NAME }}

- name: Az CLI Logout
run: az logout

0 comments on commit 3a4a174

Please sign in to comment.