From ffa2ed913b82932282cf73bffa0886ddd7ecd390 Mon Sep 17 00:00:00 2001 From: Antti Veikkolainen Date: Sat, 13 Dec 2025 19:03:52 +0200 Subject: [PATCH 1/2] #52 Temp --- .github/workflows/publish-asset-store.yml | 61 ++++++++++++++++++++--- .github/workflows/publish-web.yml | 59 ++++++++++++++++++++-- 2 files changed, 109 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish-asset-store.yml b/.github/workflows/publish-asset-store.yml index 5206b9c..e1a0afc 100644 --- a/.github/workflows/publish-asset-store.yml +++ b/.github/workflows/publish-asset-store.yml @@ -1,16 +1,65 @@ -name: Publish Asset Store _ Temp +name: Publish Asset Store on: push: branches: - - test + - main + - feature/52-av-web pull_request: + types: [opened, synchronize, reopened, closed] branches: - - test + - main + - feature/52-av-web jobs: - echo: + 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 + permissions: + id-token: write + contents: read steps: - - name: Echo message - run: echo "Hello from the test branch 👋" + - uses: actions/checkout@v3 + with: + submodules: true + lfs: false + + - name: Install OIDC Client from Core Package + run: npm install @actions/core@1.6.0 @actions/http-client + + - name: Get Id Token + uses: actions/github-script@v6 + id: idtoken + with: + script: | + const coredemo = require('@actions/core') + return await coredemo.getIDToken() + result-encoding: string + + - 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_WHITE_SKY_0ACD4AD03 }} + 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: "/AssetStore/asset-store-ui" # App source code path + api_location: "" # Api source code path - optional + # output_location: "app" # Built app content directory - optional + github_id_token: ${{ steps.idtoken.outputs.result }} + app_build_command: "CI=false npm run build" + ###### 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: + action: "close" + diff --git a/.github/workflows/publish-web.yml b/.github/workflows/publish-web.yml index b7f0c3d..820d2a5 100644 --- a/.github/workflows/publish-web.yml +++ b/.github/workflows/publish-web.yml @@ -3,14 +3,63 @@ name: Publish Web on: push: branches: - - test + - main + - feature/52-av-web pull_request: + types: [opened, synchronize, reopened, closed] branches: - - test + - main + - feature/52-av-web jobs: - echo: + 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 + permissions: + id-token: write + contents: read steps: - - name: Echo message - run: echo "Hello from the test branch 👋" + - uses: actions/checkout@v3 + with: + submodules: true + lfs: false + + - name: Install OIDC Client from Core Package + run: npm install @actions/core@1.6.0 @actions/http-client + + - name: Get Id Token + uses: actions/github-script@v6 + id: idtoken + with: + script: | + const coredemo = require('@actions/core') + return await coredemo.getIDToken() + result-encoding: string + + - 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_WHITE_SKY_0ACD4AD03 }} + 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: "/AssetStore/asset-store-ui" # App source code path + api_location: "" # Api source code path - optional + # output_location: "app" # Built app content directory - optional + github_id_token: ${{ steps.idtoken.outputs.result }} + app_build_command: "CI=false npm run build" + ###### 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: + action: "close" + From b1077e271973d1765e978a575d965afd6feb6225 Mon Sep 17 00:00:00 2001 From: Antti Veikkolainen Date: Sat, 13 Dec 2025 23:20:35 +0200 Subject: [PATCH 2/2] #52 Test --- ...-static-web-apps-kind-meadow-06167bf03.yml | 46 ------------- ...re-static-web-apps-white-sky-0acd4ad03.yml | 65 ------------------- .github/workflows/publish-web.yml | 30 ++------- 3 files changed, 7 insertions(+), 134 deletions(-) delete mode 100644 .github/workflows/azure-static-web-apps-kind-meadow-06167bf03.yml delete mode 100644 .github/workflows/azure-static-web-apps-white-sky-0acd4ad03.yml diff --git a/.github/workflows/azure-static-web-apps-kind-meadow-06167bf03.yml b/.github/workflows/azure-static-web-apps-kind-meadow-06167bf03.yml deleted file mode 100644 index f86a398..0000000 --- a/.github/workflows/azure-static-web-apps-kind-meadow-06167bf03.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Azure Static Web Apps CI/CD - -on: - push: - branches: - - main - pull_request: - types: [opened, synchronize, reopened, closed] - branches: - - main - -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_KIND_MEADOW_06167BF03 }} - 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: "./Portal/sharpengine-web-ui" # App source code path - api_location: "" # Api source code path - optional - output_location: "build" # 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_KIND_MEADOW_06167BF03 }} - action: "close" diff --git a/.github/workflows/azure-static-web-apps-white-sky-0acd4ad03.yml b/.github/workflows/azure-static-web-apps-white-sky-0acd4ad03.yml deleted file mode 100644 index cabdeb5..0000000 --- a/.github/workflows/azure-static-web-apps-white-sky-0acd4ad03.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Publish Asset Store - -on: - push: - branches: - - main - - feature/52-av-web - pull_request: - types: [opened, synchronize, reopened, closed] - branches: - - main - - feature/52-av-web - -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 - permissions: - id-token: write - contents: read - steps: - - uses: actions/checkout@v3 - with: - submodules: true - lfs: false - - - name: Install OIDC Client from Core Package - run: npm install @actions/core@1.6.0 @actions/http-client - - - name: Get Id Token - uses: actions/github-script@v6 - id: idtoken - with: - script: | - const coredemo = require('@actions/core') - return await coredemo.getIDToken() - result-encoding: string - - - 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_WHITE_SKY_0ACD4AD03 }} - 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: "/AssetStore/asset-store-ui" # App source code path - api_location: "" # Api source code path - optional - # output_location: "app" # Built app content directory - optional - github_id_token: ${{ steps.idtoken.outputs.result }} - app_build_command: "CI=false npm run build" - ###### 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: - action: "close" - diff --git a/.github/workflows/publish-web.yml b/.github/workflows/publish-web.yml index 820d2a5..5886c27 100644 --- a/.github/workflows/publish-web.yml +++ b/.github/workflows/publish-web.yml @@ -1,4 +1,4 @@ -name: Publish Web +name: Publish SharpEngine Web Portal on: push: @@ -16,39 +16,23 @@ jobs: if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest name: Build and Deploy Job - permissions: - id-token: write - contents: read steps: - uses: actions/checkout@v3 with: submodules: true lfs: false - - - name: Install OIDC Client from Core Package - run: npm install @actions/core@1.6.0 @actions/http-client - - - name: Get Id Token - uses: actions/github-script@v6 - id: idtoken - with: - script: | - const coredemo = require('@actions/core') - return await coredemo.getIDToken() - result-encoding: string - - 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_WHITE_SKY_0ACD4AD03 }} + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_KIND_MEADOW_06167BF03 }} + 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: "/AssetStore/asset-store-ui" # App source code path - api_location: "" # Api source code path - optional - # output_location: "app" # Built app content directory - optional - github_id_token: ${{ steps.idtoken.outputs.result }} + app_location: "./Portal/sharpengine-web-ui" # App source code path + # api_location: "" # Api source code path - optional + output_location: "build" # Built app content directory - optional app_build_command: "CI=false npm run build" ###### End of Repository/Build Configurations ###### @@ -61,5 +45,5 @@ jobs: id: closepullrequest uses: Azure/static-web-apps-deploy@v1 with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_KIND_MEADOW_06167BF03 }} action: "close" -