mirror of
https://github.com/Danneschs/platbik.git
synced 2026-08-08 01:57:37 +02:00
Compare commits
5 Commits
4c75d08486
...
6d666ab88f
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d666ab88f | |||
| 3368779cf3 | |||
| 040548aaef | |||
| fc25b9a4e8 | |||
| 141871de0d |
52
.github/workflows/release.yml
vendored
Normal file
52
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
name: Build and Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
|
||||||
|
|
||||||
|
# Frontend
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
registry-url: 'https://npm.pkg.github.com/'
|
||||||
|
scope: '@danneschs'
|
||||||
|
|
||||||
|
- run: npm ci
|
||||||
|
working-directory: ./src/frontend
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.PACKAGES_FETCH_TOKEN }}
|
||||||
|
|
||||||
|
- run: npm run build
|
||||||
|
working-directory: ./src/frontend
|
||||||
|
|
||||||
|
# Backend
|
||||||
|
- name: Setup .NET
|
||||||
|
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7
|
||||||
|
with:
|
||||||
|
dotnet-version: '10.0.x'
|
||||||
|
|
||||||
|
- run: dotnet publish backend.csproj -c Release -o ./publish
|
||||||
|
working-directory: ./src/backend
|
||||||
|
|
||||||
|
# Create ZIP
|
||||||
|
- name: Create Zip Archive
|
||||||
|
run: zip -r release.zip ./src/frontend/dist ./src/backend/publish
|
||||||
|
|
||||||
|
# Release
|
||||||
|
- name: Create Release
|
||||||
|
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda
|
||||||
|
with:
|
||||||
|
files: release.zip
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,7 +1,6 @@
|
|||||||
dist
|
dist
|
||||||
node_modules
|
node_modules
|
||||||
*.bak
|
*.bak
|
||||||
package-lock.json
|
|
||||||
.idea
|
.idea
|
||||||
bin
|
bin
|
||||||
obj
|
obj
|
||||||
|
|||||||
@ -72,8 +72,10 @@ public class Program
|
|||||||
builder.Services.AddAuthorization();
|
builder.Services.AddAuthorization();
|
||||||
|
|
||||||
// Database
|
// Database
|
||||||
|
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection");
|
||||||
|
|
||||||
builder.Services.AddDbContext<AppDbContext>(options =>
|
builder.Services.AddDbContext<AppDbContext>(options =>
|
||||||
options.UseSqlite("Data Source=Data/app.db"));
|
options.UseSqlite(connectionString));
|
||||||
|
|
||||||
// CORS: in dev allow Vite (localhost:5173), in production allow specific domain
|
// CORS: in dev allow Vite (localhost:5173), in production allow specific domain
|
||||||
var allowedOrigins = builder.Environment.IsDevelopment()
|
var allowedOrigins = builder.Environment.IsDevelopment()
|
||||||
@ -162,4 +164,4 @@ public class Program
|
|||||||
app.Run();
|
app.Run();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,5 +4,8 @@
|
|||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
"Microsoft.AspNetCore": "Warning"
|
"Microsoft.AspNetCore": "Warning"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"DefaultConnection": "Data Source=Data/app.db"
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,27 +1,26 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": ".",
|
|
||||||
"paths": {
|
"paths": {
|
||||||
"@bookmarks/*": ["src/bookmarks/*"],
|
"@bookmarks/*": ["./src/bookmarks/*"],
|
||||||
"@auth/*": ["src/auth/*"],
|
"@auth/*": ["./src/auth/*"],
|
||||||
"@objects/*": ["src/objects/*"],
|
"@objects/*": ["./src/objects/*"],
|
||||||
"@styles/*": ["src/styles/*"],
|
"@styles/*": ["./src/styles/*"],
|
||||||
|
|
||||||
"@api/*": ["src/api/*"],
|
"@api/*": ["./src/api/*"],
|
||||||
"@components/*": ["src/components/*"],
|
"@components/*": ["./src/components/*"],
|
||||||
"@forms/*": ["src/components/forms/*"],
|
"@forms/*": ["./src/components/forms/*"],
|
||||||
"@tables/*": ["src/components/tables/*"],
|
"@tables/*": ["./src/components/tables/*"],
|
||||||
"@dialogs/*": ["src/components/dialogs/*"],
|
"@dialogs/*": ["./src/components/dialogs/*"],
|
||||||
"@columns/*": ["src/components/columns/*"],
|
"@columns/*": ["./src/components/columns/*"],
|
||||||
"@atoms/*": ["src/components/atoms/*"],
|
"@atoms/*": ["./src/components/atoms/*"],
|
||||||
"@main/*": ["src/*"],
|
"@main/*": ["./src/*"],
|
||||||
"@backend/*": ["backend/*"],
|
"@backend/*": ["./backend/*"],
|
||||||
"@models/*": ["backend/models/*"],
|
"@models/*": ["./backend/models/*"],
|
||||||
"@routes/*": ["backend/routes/*"],
|
"@routes/*": ["./backend/routes/*"],
|
||||||
"@mappers/*": ["src/mappers/*"],
|
"@mappers/*": ["./src/mappers/*"],
|
||||||
"@config/*": ["src/config/*"]
|
"@config/*": ["./src/config/*"]
|
||||||
},
|
},
|
||||||
"moduleResolution": "node"
|
"moduleResolution": "bundler"
|
||||||
},
|
},
|
||||||
"include": ["src", "backend"]
|
"include": ["src", "backend"]
|
||||||
}
|
}
|
||||||
|
|||||||
5937
src/frontend/package-lock.json
generated
Normal file
5937
src/frontend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "my-app",
|
"name": "platbik-fe",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@ -12,7 +12,7 @@
|
|||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@danneschs/libnik-ui": "file:../../../libnik-ui/danneschs-libnik-ui-0.1.0.tgz",
|
"@danneschs/libnik-ui": "^0.1.0",
|
||||||
"@emotion/react": "^11.14.0",
|
"@emotion/react": "^11.14.0",
|
||||||
"@emotion/styled": "^11.14.0",
|
"@emotion/styled": "^11.14.0",
|
||||||
"@fontsource/roboto": "^5.2.5",
|
"@fontsource/roboto": "^5.2.5",
|
||||||
@ -36,6 +36,7 @@
|
|||||||
"eslint-plugin-react-hooks": "^5.1.0",
|
"eslint-plugin-react-hooks": "^5.1.0",
|
||||||
"eslint-plugin-react-refresh": "^0.4.19",
|
"eslint-plugin-react-refresh": "^0.4.19",
|
||||||
"globals": "^15.15.0",
|
"globals": "^15.15.0",
|
||||||
|
"rollup-plugin-license": "^3.7.1",
|
||||||
"vite": "^6.2.0",
|
"vite": "^6.2.0",
|
||||||
"vite-plugin-singlefile": "^2.2.0"
|
"vite-plugin-singlefile": "^2.2.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
|
import license from 'rollup-plugin-license';
|
||||||
import react from "@vitejs/plugin-react";
|
import react from "@vitejs/plugin-react";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { fileURLToPath } from "url";
|
import { fileURLToPath } from "url";
|
||||||
@ -13,7 +14,17 @@ export default defineConfig({
|
|||||||
build: {
|
build: {
|
||||||
target: "esnext",
|
target: "esnext",
|
||||||
cssCodeSplit: false,
|
cssCodeSplit: false,
|
||||||
assetsInlineLimit: 100000000, // vše inline
|
assetsInlineLimit: 100000000,
|
||||||
|
rollupOptions: {
|
||||||
|
plugins: [
|
||||||
|
license({
|
||||||
|
thirdParty: {
|
||||||
|
// Creates licenses.txt in dist folder
|
||||||
|
output: path.resolve(__dirname, './dist/licenses.txt'),
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
@ -40,9 +51,9 @@ export default defineConfig({
|
|||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
"/api": {
|
"/api": {
|
||||||
target: "http://localhost:5119", // port backendu z launchSettings
|
target: "http://localhost:5119", // port for backend from launchSettings
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: false, // backend není HTTPS
|
secure: false, // backend is not HTTPS
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user