From ca68fb45b916fdb04eb0b9dd3fc06d7c6075826e Mon Sep 17 00:00:00 2001 From: marcellojordan <50456286+marcellojordan@users.noreply.github.com> Date: Wed, 28 May 2025 15:33:04 -0400 Subject: [PATCH 1/4] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/master_policynotes-poc.yml | 78 ++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .github/workflows/master_policynotes-poc.yml diff --git a/.github/workflows/master_policynotes-poc.yml b/.github/workflows/master_policynotes-poc.yml new file mode 100644 index 000000000..9c687c2e6 --- /dev/null +++ b/.github/workflows/master_policynotes-poc.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 - policynotes-poc + +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.2' + + - 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_F03D22EB4E7D4CACBF3A3726F4404FA5 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_CD04687AAB754B96AE92BADC927A3920 }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_4B2494D27EAE41CD9B0227516083855A }} + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v3 + id: deploy-to-webapp + with: + app-name: 'policynotes-poc' + slot-name: 'Production' + package: . + \ No newline at end of file From 992dd7a7a3c47ccc1606e9a524a6ad31d1401bae Mon Sep 17 00:00:00 2001 From: marcellojordan <50456286+marcellojordan@users.noreply.github.com> Date: Wed, 28 May 2025 15:57:37 -0400 Subject: [PATCH 2/4] Add or update the Azure App Service build and deployment workflow config --- .../workflows/master_policynotes-poc-2.yml | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .github/workflows/master_policynotes-poc-2.yml diff --git a/.github/workflows/master_policynotes-poc-2.yml b/.github/workflows/master_policynotes-poc-2.yml new file mode 100644 index 000000000..b83dc689e --- /dev/null +++ b/.github/workflows/master_policynotes-poc-2.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 - policynotes-poc-2 + +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.2' + + - 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_BB50F4D40E8446ADBFA38433A0E171F9 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_2A5C6F3EF1BF47ABAB820EE13916613D }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_61164892582243E6AB55EEDD2F17FCE6 }} + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v3 + id: deploy-to-webapp + with: + app-name: 'policynotes-poc-2' + slot-name: 'Production' + package: . + \ No newline at end of file From 0d6dfca6ca94b352c199ac34ae0af1f3125ec608 Mon Sep 17 00:00:00 2001 From: marcellojordan <50456286+marcellojordan@users.noreply.github.com> Date: Wed, 28 May 2025 16:02:15 -0400 Subject: [PATCH 3/4] Helloazure --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 82966e27a..b6b30ec86 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,3 @@ Date: Wed, 28 May 2025 16:14:06 -0400 Subject: [PATCH 4/4] message ok --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index b6b30ec86..73397a9df 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,3 @@