17 Commits

Author SHA1 Message Date
f4737f4dcf Don't create self signed cert in production build pipeline
All checks were successful
Build Backend and Frontend / Build & Test .NET Backend (push) Successful in 32s
Build Backend and Frontend / Build Frontend (push) Successful in 12s
2025-05-23 16:33:23 +02:00
1d68f177de Fixed a small stupid mistake
Some checks failed
Build Backend and Frontend / Build & Test .NET Backend (push) Successful in 31s
Build Backend and Frontend / Build Frontend (push) Failing after 11s
2025-05-23 16:18:14 +02:00
ae5096bacd Installed zod, because I somehow didin't have to do that locally
Some checks failed
Build Backend and Frontend / Build & Test .NET Backend (push) Successful in 41s
Build Backend and Frontend / Build Frontend (push) Failing after 10s
- Also use v4
2025-05-23 16:05:08 +02:00
a2608eac5b Rebuild package-lock.json
Some checks failed
Build Backend and Frontend / Build & Test .NET Backend (push) Successful in 36s
Build Backend and Frontend / Build Frontend (push) Failing after 10s
2025-05-23 15:58:26 +02:00
189069361f Merge branch 'feature/login_and_auth' into feature/ci-cd-pipeline
Some checks failed
Build Backend and Frontend / Build & Test .NET Backend (push) Successful in 33s
Build Backend and Frontend / Build Frontend (push) Failing after 12s
2025-05-23 15:41:13 +02:00
bd7759cbcb hotfix die zweite
Some checks failed
Build Backend and Frontend / Build & Test .NET Backend (push) Successful in 31s
Build Backend and Frontend / Build Frontend (push) Failing after 11s
2025-05-22 17:50:46 +02:00
af0c49db77 hotfix
Some checks failed
Build Backend and Frontend / Build & Test .NET Backend (push) Successful in 32s
Build Backend and Frontend / Build Frontend (push) Has been cancelled
2025-05-22 17:50:07 +02:00
a0c994bc44 demo gelöscht und on push start der pipeline
Some checks failed
Build Backend and Frontend / Build & Test .NET Backend (push) Successful in 32s
Build Backend and Frontend / Build Frontend (push) Failing after 16s
2025-05-22 17:48:54 +02:00
9758cba025 zwei manuelle workflows hinzugefügt für frontend und backend 2025-05-22 17:47:46 +02:00
fcd81969a8 .NET SDK version auf 9 angehoben 2025-05-22 17:39:13 +02:00
0d4046d56c fix einrückung 2025-05-22 17:36:35 +02:00
94d17a1266 first try von einer backend - frontend pipeline 2025-05-22 17:34:01 +02:00
326f3531b1 wer brauch schon apt-get 2025-05-22 15:52:51 +02:00
6eb6c09a4d sudo weg 2025-05-22 15:51:38 +02:00
1339a22ab8 nodejs dem workflow hinzugefügt 2025-05-22 15:50:01 +02:00
465c4ca0c1 manueller workflow 2025-05-22 15:33:13 +02:00
d874c948e8 initial commit für die CI/CD pipeline
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 8s
2025-05-22 15:25:16 +02:00
8 changed files with 948 additions and 1049 deletions

View File

@ -0,0 +1,27 @@
name: Build Backend
run-name: ${{ gitea.actor }} is testing out building the Backend
on:
workflow_dispatch:
jobs:
backend:
name: Build & Test .NET Backend
runs-on: ubuntu-latest
steps:
- name: Clone the repository
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build the project
run: dotnet build USEntryCoach.sln --no-restore --configuration Release
- name: Run tests
run: dotnet test USEntryCoach.sln --no-build --verbosity normal

View File

@ -0,0 +1,26 @@
name: Build Frontend
run-name: ${{ gitea.actor }} is testing out building the Frontend
on:
workflow_dispatch:
jobs:
frontend:
name: Build Frontend
runs-on: ubuntu-latest
steps:
- name: Clone the repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm install
working-directory: ./usentrycoach.client
- name: Build frontend
run: NODE_ENV=production npm run build
working-directory: ./usentrycoach.client

View File

@ -0,0 +1,47 @@
name: Build Backend and Frontend
run-name: ${{ gitea.actor }} is testing out Building Website
on: [push]
jobs:
backend:
name: Build & Test .NET Backend
runs-on: ubuntu-latest
steps:
- name: Clone the repository
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build the project
run: dotnet build USEntryCoach.sln --no-restore --configuration Release
- name: Run tests
run: dotnet test USEntryCoach.sln --no-build --verbosity normal
frontend:
name: Build Frontend
runs-on: ubuntu-latest
needs: backend
steps:
- name: Clone the repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm install
working-directory: ./usentrycoach.client
- name: Build frontend
run: npm run build
working-directory: ./usentrycoach.client

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,8 @@
},
"dependencies": {
"react": "^19.1.0",
"react-dom": "^19.1.0"
"react-dom": "^19.1.0",
"zod": "^3.25.23"
},
"devDependencies": {
"@eslint/js": "^9.25.0",

View File

@ -1,6 +1,6 @@
import {useState, useRef, useEffect} from 'react';
import useLoginToken from "../Hooks/useLoginToken.tsx";
import { z } from 'zod';
import { z } from 'zod/v4';
function SessionActive({stopSession} : {stopSession: () => void})
{

View File

@ -1,5 +1,5 @@
import { useState, type FormEvent } from 'react';
import { z } from 'zod';
import { z } from 'zod/v4';
export default function Login({ setToken } : {setToken: (token: string) => void})
{

View File

@ -7,6 +7,8 @@ import path from 'path';
import child_process from 'child_process';
import { env } from 'process';
const isDevelopment = env.NODE_ENV !== 'production';
const baseFolder =
env.APPDATA !== undefined && env.APPDATA !== ''
? `${env.APPDATA}/ASP.NET/https`
@ -21,7 +23,8 @@ if (!fs.existsSync(baseFolder))
fs.mkdirSync(baseFolder, { recursive: true });
}
if (!fs.existsSync(certFilePath) || !fs.existsSync(keyFilePath))
// Generate dev certificate, if we are in development mode, and it doesn't exist yet.
if (isDevelopment && (!fs.existsSync(certFilePath) || !fs.existsSync(keyFilePath)))
{
if (0 !== child_process.spawnSync('dotnet', [
'dev-certs',
@ -32,7 +35,7 @@ if (!fs.existsSync(certFilePath) || !fs.existsSync(keyFilePath))
'Pem',
'--no-password',
], { stdio: 'inherit', }).status)
{
{
throw new Error("Could not create certificate.");
}
}
@ -68,9 +71,10 @@ export default defineConfig({
server: {
proxy: proxyConfig,
port: parseInt(env.DEV_SERVER_PORT ?? '54044'),
https: {
// This is only relevant for development anyway.
https: isDevelopment ? {
key: fs.readFileSync(keyFilePath),
cert: fs.readFileSync(certFilePath),
}
} : undefined
}
})