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 |
+21
-80
@@ -1,80 +1,21 @@
|
||||
# Define the stages of the pipeline
|
||||
stages:
|
||||
- install
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
|
||||
# Job to install dependencies
|
||||
install_dependencies:
|
||||
stage: install
|
||||
image: node:16
|
||||
script:
|
||||
- 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
|
||||
build_nextjs:
|
||||
stage: build
|
||||
image: node:16
|
||||
script:
|
||||
- npm run build
|
||||
dependencies:
|
||||
- install_dependencies
|
||||
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:
|
||||
paths:
|
||||
- public
|
||||
# Only run on merge to main branch
|
||||
only:
|
||||
- main
|
||||
# Allow manual execution
|
||||
when: manual
|
||||
image: node:20
|
||||
|
||||
# Cache für schnellere Builds
|
||||
cache:
|
||||
paths:
|
||||
- node_modules/
|
||||
- .next/cache/
|
||||
|
||||
before_script:
|
||||
- npm ci
|
||||
|
||||
pages:
|
||||
script:
|
||||
- npm run build
|
||||
- mkdir -p public
|
||||
- cp -r out/* public
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
rules:
|
||||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
||||
+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;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"export": "next export",
|
||||
"lint": "next lint",
|
||||
"test": "jest --watchAll",
|
||||
"test:ci": "jest --ci --coverage"
|
||||
|
||||
Reference in New Issue
Block a user