From 34d46d890c3865756033c2f59834f996e5b9fcc4 Mon Sep 17 00:00:00 2001 From: idittrich-valueon <137774853+idittrich-valueon@users.noreply.github.com> Date: Fri, 30 May 2025 12:26:18 +0200 Subject: [PATCH 1/3] Update api.ts --- src/api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api.ts b/src/api.ts index c9fdf24..4699eed 100644 --- a/src/api.ts +++ b/src/api.ts @@ -2,8 +2,8 @@ import axios from 'axios'; const api = axios.create({ - //baseURL: 'https://gateway.poweron-center.net', - baseURL: 'http://localhost:8000', + baseURL: 'https://gateway.poweron-center.net', + //baseURL: 'http://localhost:8000', withCredentials: true }); From 295b4d4a23e521230a7043a362e5761f8df4852c Mon Sep 17 00:00:00 2001 From: idittrich-valueon <137774853+idittrich-valueon@users.noreply.github.com> Date: Wed, 4 Jun 2025 11:02:10 +0200 Subject: [PATCH 2/3] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/int_poweron-nyla-int.yml | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 .github/workflows/int_poweron-nyla-int.yml diff --git a/.github/workflows/int_poweron-nyla-int.yml b/.github/workflows/int_poweron-nyla-int.yml new file mode 100644 index 0000000..6101e82 --- /dev/null +++ b/.github/workflows/int_poweron-nyla-int.yml @@ -0,0 +1,74 @@ +# 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 Node.js app to Azure Web App - poweron-nyla-int + +on: + push: + branches: + - int + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read #This is required for actions/checkout + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js version + uses: actions/setup-node@v3 + with: + node-version: '20.x' + + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm run test --if-present + + - name: Zip artifact for deployment + run: zip release.zip ./* -r + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v4 + with: + name: node-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: node-app + + - name: Unzip artifact for deployment + run: unzip release.zip + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_6DD84FBFF4714B219CFB34DCFFCD5AB8 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_F971FF000D07422C8DE63D80087B1699 }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_B5B74D4E312E4B0AB251704F387F2166 }} + + - name: 'Deploy to Azure Web App' + id: deploy-to-webapp + uses: azure/webapps-deploy@v3 + with: + app-name: 'poweron-nyla-int' + slot-name: 'Production' + package: . + \ No newline at end of file From 8fc54e55d52d77c469f0b4aeada25763084a1789 Mon Sep 17 00:00:00 2001 From: idittrich-valueon <137774853+idittrich-valueon@users.noreply.github.com> Date: Wed, 4 Jun 2025 11:31:50 +0200 Subject: [PATCH 3/3] Update int_poweron-nyla-int.yml --- .github/workflows/int_poweron-nyla-int.yml | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/int_poweron-nyla-int.yml b/.github/workflows/int_poweron-nyla-int.yml index 6101e82..d88ef32 100644 --- a/.github/workflows/int_poweron-nyla-int.yml +++ b/.github/workflows/int_poweron-nyla-int.yml @@ -41,12 +41,12 @@ jobs: deploy: runs-on: ubuntu-latest needs: build - environment: - name: 'Production' + 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 + 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 @@ -56,13 +56,13 @@ jobs: - name: Unzip artifact for deployment run: unzip release.zip - - - name: Login to Azure - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_6DD84FBFF4714B219CFB34DCFFCD5AB8 }} - tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_F971FF000D07422C8DE63D80087B1699 }} - subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_B5B74D4E312E4B0AB251704F387F2166 }} + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_6DD84FBFF4714B219CFB34DCFFCD5AB8 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_F971FF000D07422C8DE63D80087B1699 }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_B5B74D4E312E4B0AB251704F387F2166 }} - name: 'Deploy to Azure Web App' id: deploy-to-webapp @@ -70,5 +70,5 @@ jobs: with: app-name: 'poweron-nyla-int' slot-name: 'Production' - package: . - \ No newline at end of file + package: ./dist/ +