From 2e19c1c9039c0abe76108349d6d8ae7ecedd43f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eyl=C3=BCl=20=C3=96zatman?= <74192529+eylulozatman@users.noreply.github.com> Date: Tue, 21 Nov 2023 00:32:04 +0300 Subject: [PATCH] Add or update the Azure App Service build and deployment workflow config --- .../master_midtermairlineappeylul.yml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/master_midtermairlineappeylul.yml diff --git a/.github/workflows/master_midtermairlineappeylul.yml b/.github/workflows/master_midtermairlineappeylul.yml new file mode 100644 index 0000000..ab3ac12 --- /dev/null +++ b/.github/workflows/master_midtermairlineappeylul.yml @@ -0,0 +1,53 @@ +# 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 WAR app to Azure Web App - midtermAirlineAppEylul + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Java version + uses: actions/setup-java@v1 + with: + java-version: '17' + + - name: Build with Maven + run: mvn clean install + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v3 + with: + name: java-app + path: '${{ github.workspace }}/target/*.war' + + deploy: + runs-on: windows-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v3 + with: + name: java-app + + - name: Deploy to Azure Web App + id: deploy-to-webapp + uses: azure/webapps-deploy@v2 + with: + app-name: 'midtermAirlineAppEylul' + slot-name: 'Production' + package: '*.war' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_778A88219AC14F6B9DEA3825A9F3E876 }} \ No newline at end of file