From 831f54166d731b06e01dcf04e66c47ed959cdca9 Mon Sep 17 00:00:00 2001 From: bib-cockpit <125647577+bib-cockpit@users.noreply.github.com> Date: Wed, 28 Feb 2024 13:17:52 +0100 Subject: [PATCH 1/2] ci: add Azure Static Web Apps workflow file on-behalf-of: @Azure opensource@microsoft.com --- ...static-web-apps-polite-cliff-084832d03.yml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/azure-static-web-apps-polite-cliff-084832d03.yml diff --git a/.github/workflows/azure-static-web-apps-polite-cliff-084832d03.yml b/.github/workflows/azure-static-web-apps-polite-cliff-084832d03.yml new file mode 100644 index 00000000..392d2593 --- /dev/null +++ b/.github/workflows/azure-static-web-apps-polite-cliff-084832d03.yml @@ -0,0 +1,46 @@ +name: Azure Static Web Apps CI/CD + +on: + push: + branches: + - Application + pull_request: + types: [opened, synchronize, reopened, closed] + branches: + - Application + +jobs: + build_and_deploy_job: + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') + runs-on: ubuntu-latest + name: Build and Deploy Job + steps: + - uses: actions/checkout@v3 + with: + submodules: true + lfs: false + - name: Build And Deploy + id: builddeploy + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_POLITE_CLIFF_084832D03 }} + repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + action: "upload" + ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### + # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig + app_location: "/" # App source code path + api_location: "" # Api source code path - optional + output_location: "" # Built app content directory - optional + ###### End of Repository/Build Configurations ###### + + close_pull_request_job: + if: github.event_name == 'pull_request' && github.event.action == 'closed' + runs-on: ubuntu-latest + name: Close Pull Request Job + steps: + - name: Close Pull Request + id: closepullrequest + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_POLITE_CLIFF_084832D03 }} + action: "close" From 65ffe63ad89f68f44efa7862a8a0cd1842dcda27 Mon Sep 17 00:00:00 2001 From: bib-cockpit <125647577+bib-cockpit@users.noreply.github.com> Date: Wed, 28 Feb 2024 13:18:58 +0100 Subject: [PATCH 2/2] Update azure-static-web-apps-polite-cliff-084832d03.yml --- .../azure-static-web-apps-polite-cliff-084832d03.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-polite-cliff-084832d03.yml b/.github/workflows/azure-static-web-apps-polite-cliff-084832d03.yml index 392d2593..33433e56 100644 --- a/.github/workflows/azure-static-web-apps-polite-cliff-084832d03.yml +++ b/.github/workflows/azure-static-web-apps-polite-cliff-084832d03.yml @@ -18,19 +18,16 @@ jobs: - uses: actions/checkout@v3 with: submodules: true - lfs: false - name: Build And Deploy id: builddeploy uses: Azure/static-web-apps-deploy@v1 with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_POLITE_CLIFF_084832D03 }} + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) action: "upload" ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig - app_location: "/" # App source code path - api_location: "" # Api source code path - optional - output_location: "" # Built app content directory - optional + app_location: "/www" # App source code path ###### End of Repository/Build Configurations ###### close_pull_request_job: @@ -42,5 +39,6 @@ jobs: id: closepullrequest uses: Azure/static-web-apps-deploy@v1 with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_POLITE_CLIFF_084832D03 }} + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} action: "close" + #Testeintrag 22