Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
eyad-hussein authored Jan 4, 2024
1 parent f04b000 commit 210fe12
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy to Azure App Service

on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

- name: Install Composer dependencies
run: composer install --no-interaction --prefer-dist

- name: Build the application
run: cp .env.example .env

- name: Deploy to Azure App Service
uses: azure/webapps-deploy@v2
with:
app-name: <Your-App-Service-Name>
slot-name: <Your-Deployment-Slot-Name> # Optional: If using deployment slots
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}

0 comments on commit 210fe12

Please sign in to comment.