From e679f661405eae7dfb371880ca70adf98082adf0 Mon Sep 17 00:00:00 2001 From: Khalid youssef <127295426+Ykhali@users.noreply.github.com> Date: Mon, 26 May 2025 10:37:43 +0100 Subject: [PATCH 1/5] Add files via upload --- about.php | 42 ++++++++++++++++++++++++++++++++++++++++++ aboutTest.php | 14 ++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 about.php create mode 100644 aboutTest.php diff --git a/about.php b/about.php new file mode 100644 index 000000000..fe135afd4 --- /dev/null +++ b/about.php @@ -0,0 +1,42 @@ + + + + + À propos + + + +
+

À propos

+

Ce site est un exemple simple en PHP pour afficher "Hello World!" avec une page d'accueil stylisée.

+
+ + diff --git a/aboutTest.php b/aboutTest.php new file mode 100644 index 000000000..3552bcec3 --- /dev/null +++ b/aboutTest.php @@ -0,0 +1,14 @@ +À propos') !== false && + strpos($aboutPage, 'Ce site est un exemple simple en PHP') !== false) { + echo "Test passed: Content found.\n"; +} else { + echo "Test failed: Content missing.\n"; +} +?> \ No newline at end of file From cb0822c1d91f91401dca0d528d608a0856f3e0cc Mon Sep 17 00:00:00 2001 From: Khalid youssef <127295426+Ykhali@users.noreply.github.com> Date: Mon, 26 May 2025 10:40:51 +0100 Subject: [PATCH 2/5] Create main.yml --- .github/workflows/main.yml | 78 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..88b0a543f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,78 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: Build and deploy PHP app to Azure Web App - KHDEMM + +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: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.4' + + - name: Check if composer.json exists + id: check_files + uses: andstor/file-existence-action@v1 + with: + files: 'composer.json' + + - name: Run composer install if composer.json exists + if: steps.check_files.outputs.files_exists == 'true' + run: composer validate --no-check-publish && composer install --prefer-dist --no-progress + + - name: Zip artifact for deployment + run: zip release.zip ./* -r + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v4 + with: + name: php-app + path: release.zip + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + 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: php-app + + - name: Unzip artifact for deployment + run: unzip release.zip + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_FCA5D816D9A44708B716931E554A24DA }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_32AC9810B5844C25AEBFADC6490BF2C0 }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_CE3AB985EECA4E5E9A7F70AC39F28221 }} + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v3 + id: deploy-to-webapp + with: + app-name: 'KHDEMM' + slot-name: 'Production' + package: . + From 9f53b4a174fa7d6d0b240a9ffae9699c2554930d Mon Sep 17 00:00:00 2001 From: Khalid youssef <127295426+Ykhali@users.noreply.github.com> Date: Mon, 26 May 2025 10:43:45 +0100 Subject: [PATCH 3/5] Update index.php --- index.php | 247 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 245 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 82966e27a..db4793735 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,246 @@ - + + + + Ma To-Do List + + + +
+

my to-do list

+
+ + +
+ +
Aucune tâche pour le moment.
+
+ Astuce : Click "DELETE" to delete a task.
+ Appuyez sur Entrée pour ajouter rapidement une tâche.
+
+ Cette application ne sauvegarde pas les tâches après le rechargement de la page.
+ Pour une version persistante, il faudrait utiliser une base de données ou le stockage local. +
+
+ + + + From 5567038f0d0816cac589a4a72024bca8911167dd Mon Sep 17 00:00:00 2001 From: chafiq Hamza Date: Mon, 26 May 2025 10:55:31 +0100 Subject: [PATCH 4/5] ddd --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index db4793735..f14151b58 100644 --- a/index.php +++ b/index.php @@ -119,7 +119,7 @@