Skip to content
Open

test #125

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/master_app-service-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions

name: Build and deploy Python app to Azure Web App - App-Service-app

on:
push:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read #This is required for actions/checkout

steps:
- uses: actions/checkout@v4

- name: Set up Python version
uses: actions/setup-python@v5
with:
python-version: '3.13'

# 🛠️ Local Build Section (Optional)
# The following section in your workflow is designed to catch build issues early on the client side, before deployment. This can be helpful for debugging and validation. However, if this step significantly increases deployment time and early detection is not critical for your workflow, you may remove this section to streamline the deployment process.
- name: Create and Start virtual environment and Install dependencies
run: |
python -m venv antenv
source antenv/bin/activate
pip install -r requirements.txt

# By default, when you enable GitHub CI/CD integration through the Azure portal, the platform automatically sets the SCM_DO_BUILD_DURING_DEPLOYMENT application setting to true. This triggers the use of Oryx, a build engine that handles application compilation and dependency installation (e.g., pip install) directly on the platform during deployment. Hence, we exclude the antenv virtual environment directory from the deployment artifact to reduce the payload size.
- name: Upload artifact for deployment jobs
uses: actions/upload-artifact@v4
with:
name: python-app
path: |
.
!antenv/

# 🚫 Opting Out of Oryx Build
# If you prefer to disable the Oryx build process during deployment, follow these steps:
# 1. Remove the SCM_DO_BUILD_DURING_DEPLOYMENT app setting from your Azure App Service Environment variables.
# 2. Refer to sample workflows for alternative deployment strategies: https://github.com/Azure/actions-workflow-samples/tree/master/AppService


deploy:
runs-on: ubuntu-latest
needs: build
permissions:
id-token: write #This is required for requesting the JWT
contents: read #This is required for actions/checkout

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: python-app

- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_089DD412F15F4A8F88C5A10EFEF91C2C }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_2341029459FF4F15AF075EACDD7D2493 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_0B0D0978DE1B4EC5BAF6397932198A5D }}

- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v3
id: deploy-to-webapp
with:
app-name: 'App-Service-app'
slot-name: 'Production'

2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

@app.route("/")
def hello():
return "Hello, World!"
return "Just Do Iit!"
1 change: 1 addition & 0 deletions edit.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
edit