From eca5d9e926767b031f52b0e97a25b541bdc69a81 Mon Sep 17 00:00:00 2001 From: Ida Dittrich Date: Wed, 10 Sep 2025 11:54:35 +0200 Subject: [PATCH] bugfixing --- .env | 7 --- .env.production | 7 --- .github/workflows/int_poweron-nyla-int.yml | 73 ---------------------- .github/workflows/main_poweron-nyla.yml | 62 ------------------ src/pages/Home/Home.tsx | 1 - 5 files changed, 150 deletions(-) delete mode 100644 .env delete mode 100644 .env.production delete mode 100644 .github/workflows/int_poweron-nyla-int.yml delete mode 100644 .github/workflows/main_poweron-nyla.yml diff --git a/.env b/.env deleted file mode 100644 index 3466e9c..0000000 --- a/.env +++ /dev/null @@ -1,7 +0,0 @@ -VITE_API_BASE_URL="https://gateway-prod.poweron-center.net" -VITE_MICROSOFT_CLIENT_ID="24cd6c8a-b592-4905-a5ba-d5fa9f911154" -VITE_MICROSOFT_TENANT_ID="6a51aaeb-2467-4186-9504-2a05aedc591f" -VITE_ENTRA_CLIENT_SECRET="2iw8Q~jwqG1iacxHopBt5pstu6R45UC1gIQabcbD" -VITE_ENTRA_AUTHORITY="https://login.microsoftonline.com/6a51aaeb-2467-4186-9504-2a05aedc591f" -VITE_ENTRA_REDIRECT_PATH="/auth/callback/" -VITE_ENTRA_REDIRECT_URI="https://gateway-prod.poweron-center.net/api/msft/auth/callback/" diff --git a/.env.production b/.env.production deleted file mode 100644 index 3466e9c..0000000 --- a/.env.production +++ /dev/null @@ -1,7 +0,0 @@ -VITE_API_BASE_URL="https://gateway-prod.poweron-center.net" -VITE_MICROSOFT_CLIENT_ID="24cd6c8a-b592-4905-a5ba-d5fa9f911154" -VITE_MICROSOFT_TENANT_ID="6a51aaeb-2467-4186-9504-2a05aedc591f" -VITE_ENTRA_CLIENT_SECRET="2iw8Q~jwqG1iacxHopBt5pstu6R45UC1gIQabcbD" -VITE_ENTRA_AUTHORITY="https://login.microsoftonline.com/6a51aaeb-2467-4186-9504-2a05aedc591f" -VITE_ENTRA_REDIRECT_PATH="/auth/callback/" -VITE_ENTRA_REDIRECT_URI="https://gateway-prod.poweron-center.net/api/msft/auth/callback/" diff --git a/.github/workflows/int_poweron-nyla-int.yml b/.github/workflows/int_poweron-nyla-int.yml deleted file mode 100644 index ca685dc..0000000 --- a/.github/workflows/int_poweron-nyla-int.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Build and deploy Nyla App to int -on: - push: - branches: - - int - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Node.js version - uses: actions/setup-node@v4 - with: - node-version: '18' - cache: 'npm' - - - name: Create production environment file - run: | - echo 'VITE_API_BASE_URL="https://gateway-int.poweron-center.net"' > .env.production - echo 'VITE_MICROSOFT_CLIENT_ID="24cd6c8a-b592-4905-a5ba-d5fa9f911154"' >> .env.production - echo 'VITE_MICROSOFT_TENANT_ID="6a51aaeb-2467-4186-9504-2a05aedc591f"' >> .env.production - echo 'VITE_ENTRA_CLIENT_SECRET="2iw8Q~jwqG1iacxHopBt5pstu6R45UC1gIQabcbD"' >> .env.production - echo 'VITE_ENTRA_AUTHORITY="https://login.microsoftonline.com/6a51aaeb-2467-4186-9504-2a05aedc591f"' >> .env.production - echo 'VITE_ENTRA_REDIRECT_PATH="/auth/callback/"' >> .env.production - echo 'VITE_ENTRA_REDIRECT_URI="https://gateway-int.poweron-center.net/api/msft/auth/callback/"' >> .env.production - - - name: npm install, build - run: | - npm ci - npm run build --if-present - - - name: Upload artifact for deployment job - uses: actions/upload-artifact@v4 - with: - name: node-app - path: | - . - !node_modules - !.git - !.github - !README.md - - 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 - - steps: - - name: Download artifact from build job - uses: actions/download-artifact@v4 - with: - name: node-app - - - name: Login to Azure - uses: azure/login@v1 - with: - creds: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_POWERON_NYLA_INT }} - - - name: 'Deploy to Azure Web App' - id: deploy-to-webapp - uses: azure/webapps-deploy@v2 - with: - app-name: 'poweron-nyla-int' - slot-name: 'Production' - package: . \ No newline at end of file diff --git a/.github/workflows/main_poweron-nyla.yml b/.github/workflows/main_poweron-nyla.yml deleted file mode 100644 index cded3cb..0000000 --- a/.github/workflows/main_poweron-nyla.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Deploy Nyla Frontend to Production - -on: - push: - branches: - - main # oder dein Branch - workflow_dispatch: # Ermöglicht manuelles Triggern - -jobs: - build-and-deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: '18' - cache: 'npm' # Aktiviert Caching für schnellere Builds - - - name: Install dependencies - run: | - npm ci - npm install express - - - name: Build React app - run: npm run build - - - name: Prepare deployment package - run: | - # Create deployment package with build files and necessary configs - mkdir deploy - cp -r dist/* deploy/ - # Create a simple server.js for serving the app - echo "const express = require('express');" > deploy/server.js - echo "const path = require('path');" >> deploy/server.js - echo "const app = express();" >> deploy/server.js - echo "app.use(express.static(path.join(__dirname)));" >> deploy/server.js - echo "app.get('/*', function(req, res) { res.sendFile(path.join(__dirname, 'index.html')); });" >> deploy/server.js - echo "const port = process.env.PORT || 8080;" >> deploy/server.js - echo "app.listen(port, () => console.log('Server running on port', port));" >> deploy/server.js - # Create a new package.json for deployment - echo '{ - "name": "frontend", - "version": "1.0.0", - "private": true, - "scripts": { - "start": "node server.js" - }, - "dependencies": { - "express": "^4.18.2" - } - }' > deploy/package.json - - - name: 'Deploy to Azure Web App' - uses: azure/webapps-deploy@v3 - with: - app-name: 'poweron-nyla' - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_POWERON_NYLA }} - package: ./deploy diff --git a/src/pages/Home/Home.tsx b/src/pages/Home/Home.tsx index 8e256ee..8cffb37 100644 --- a/src/pages/Home/Home.tsx +++ b/src/pages/Home/Home.tsx @@ -1,4 +1,3 @@ -import { useEffect } from 'react'; import styles from './HomeStyles/Home.module.css'