Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d69d3905c5 | |||
| de1e327e91 | |||
| 87ccd503f5 | |||
| f3b389dffe | |||
| fb36d2f20e | |||
| 1b5e9d5285 | |||
| c1a3fb6257 | |||
| 2d13cf0af4 | |||
| e5508dd710 | |||
| ce7467546f | |||
| d4ac4c2b72 | |||
| 45967e314c | |||
| 11e4ba3569 | |||
| cbd0ef34d3 | |||
| 1b8488c15d | |||
| b72c6db922 | |||
| 5704326a41 | |||
| fbaed09d14 | |||
| 52c47cc80d | |||
| b7d67e1fc9 |
+13
-72
@@ -1,80 +1,21 @@
|
|||||||
# Define the stages of the pipeline
|
image: node:20
|
||||||
stages:
|
|
||||||
- install
|
|
||||||
- build
|
|
||||||
- test
|
|
||||||
- deploy
|
|
||||||
|
|
||||||
# Job to install dependencies
|
# Cache für schnellere Builds
|
||||||
install_dependencies:
|
cache:
|
||||||
stage: install
|
paths:
|
||||||
image: node:16
|
- node_modules/
|
||||||
script:
|
- .next/cache/
|
||||||
|
|
||||||
|
before_script:
|
||||||
- npm ci
|
- npm ci
|
||||||
cache:
|
|
||||||
paths:
|
|
||||||
- node_modules/
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- node_modules/
|
|
||||||
# Run automatically on PRs to main
|
|
||||||
only:
|
|
||||||
- merge_requests
|
|
||||||
- main
|
|
||||||
# Allow manual execution
|
|
||||||
when: manual
|
|
||||||
|
|
||||||
# Job to build the Next.js project
|
pages:
|
||||||
build_nextjs:
|
|
||||||
stage: build
|
|
||||||
image: node:16
|
|
||||||
script:
|
script:
|
||||||
- npm run build
|
- npm run build
|
||||||
dependencies:
|
- mkdir -p public
|
||||||
- install_dependencies
|
- cp -r out/* public
|
||||||
cache:
|
|
||||||
paths:
|
|
||||||
- .next/
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- .next/
|
|
||||||
# Run automatically on PRs to main
|
|
||||||
only:
|
|
||||||
- merge_requests
|
|
||||||
- main
|
|
||||||
# Allow manual execution
|
|
||||||
when: manual
|
|
||||||
|
|
||||||
# Job to run tests
|
|
||||||
run_tests:
|
|
||||||
stage: test
|
|
||||||
image: node:16
|
|
||||||
script:
|
|
||||||
- npm test # Replace with your test command (e.g. jest)
|
|
||||||
dependencies:
|
|
||||||
- install_dependencies
|
|
||||||
artifacts:
|
|
||||||
when: always
|
|
||||||
paths:
|
|
||||||
- test-reports/
|
|
||||||
# Run automatically on PRs to main
|
|
||||||
only:
|
|
||||||
- merge_requests
|
|
||||||
- main
|
|
||||||
# Allow manual execution
|
|
||||||
when: manual
|
|
||||||
|
|
||||||
# Deploy step (runs only on merge to main)
|
|
||||||
deploy:
|
|
||||||
stage: deploy
|
|
||||||
script:
|
|
||||||
- mkdir public
|
|
||||||
- cp -r .next/* public # Example for GitLab Pages, adjust as needed
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
# Only run on merge to main branch
|
rules:
|
||||||
only:
|
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
||||||
- main
|
|
||||||
# Allow manual execution
|
|
||||||
when: manual
|
|
||||||
+11
-2
@@ -1,4 +1,13 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/**
|
||||||
const nextConfig = {};
|
* @type {import('next').NextConfig}
|
||||||
|
*/
|
||||||
|
const nextConfig = {
|
||||||
|
output: 'export',
|
||||||
|
reactStrictMode: true,
|
||||||
|
images: {
|
||||||
|
unoptimized: true,
|
||||||
|
},
|
||||||
|
assetPrefix: "https://pages.fostin.de/sinusfox/Operations-Research-Tool/",
|
||||||
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
|
"export": "next export",
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
"test": "jest --watchAll",
|
"test": "jest --watchAll",
|
||||||
"test:ci": "jest --ci --coverage"
|
"test:ci": "jest --ci --coverage"
|
||||||
|
|||||||
Reference in New Issue
Block a user