diff --git a/.github/workflows/test_backend.yml b/.github/workflows/test_backend.yml index c0e65078f..f85fdfa4c 100644 --- a/.github/workflows/test_backend.yml +++ b/.github/workflows/test_backend.yml @@ -92,19 +92,4 @@ jobs: bun install --global --no-save turbo@^2 - name: Backend | Typecheck - run: turbo backend#typecheck backend#build - - locales: - if: needs.files-changed.outputs.backend == 'true' - name: Locales - Backend - needs: files-changed - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: install bun - uses: oven-sh/setup-bun@v2 - - - name: Backend | Locales - run: cd backend && bun locales \ No newline at end of file + run: turbo backend#typecheck backend#build \ No newline at end of file diff --git a/.github/workflows/test_core.yml b/.github/workflows/test_core.yml index ff5f29c1a..f3857e2ae 100644 --- a/.github/workflows/test_core.yml +++ b/.github/workflows/test_core.yml @@ -43,3 +43,18 @@ jobs: - name: typecheck && unit test run: turbo core#test core#typecheck + locales: + if: needs.files-changed.outputs.core == 'true' + name: Locales - Core + needs: files-changed + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: install bun + uses: oven-sh/setup-bun@v2 + + - name: Core | Locales + run: cd core && bun locales + diff --git a/backend/Dockerfile b/backend/Dockerfile index eeab1ac17..d3d549cab 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -114,8 +114,7 @@ COPY --chown=app:app --from=build ${DOCKER_WORKDIR}/backend/build/worker.js ./wo # add node_modules from production_node_modules COPY --chown=app:app --from=production-node-modules ${DOCKER_WORKDIR}/node_modules ./node_modules -# Copy locales -COPY --chown=app:app --from=build ${DOCKER_WORKDIR}/backend/locales ./locales +COPY --chown=app:app --from=build ${DOCKER_WORKDIR}/core/build/templates ./templates # Run command CMD ["node", "index.js"] diff --git a/backend/package.json b/backend/package.json index 0a1bab487..463683372 100644 --- a/backend/package.json +++ b/backend/package.json @@ -8,7 +8,7 @@ "author": "Gradido Academy - https://www.gradido.net", "main": "src/index.ts", "scripts": { - "build": "ts-node ./esbuild.config.ts && mkdirp build/templates/ && ncp ../core/src/emails/templates build/templates", + "build": "ts-node ./esbuild.config.ts && mkdirp build/templates/ && ncp ../core/build/templates build/templates", "dev": "cross-env TZ=UTC nodemon -w src --ext ts,pug,json,css -r tsconfig-paths/register src/index.ts", "test": "cross-env TZ=UTC NODE_ENV=development DB_DATABASE=gradido_test_backend jest --runInBand --forceExit --detectOpenHandles", "test:coverage": "cross-env TZ=UTC NODE_ENV=development DB_DATABASE=gradido_test_backend jest --coverage --runInBand --forceExit --detectOpenHandles", diff --git a/federation/Dockerfile b/federation/Dockerfile index c3a45bf3d..c754eced6 100644 --- a/federation/Dockerfile +++ b/federation/Dockerfile @@ -116,5 +116,7 @@ COPY --chown=app:app --from=build ${DOCKER_WORKDIR}/federation/build/index.js ./ # add node_modules from production_node_modules COPY --chown=app:app --from=production-node-modules ${DOCKER_WORKDIR}/node_modules ./node_modules +COPY --chown=app:app --from=build ${DOCKER_WORKDIR}/core/build/templates ./templates + # Run command CMD ["node", "index.js"] \ No newline at end of file diff --git a/federation/package.json b/federation/package.json index 057b22a98..fcf1365ab 100644 --- a/federation/package.json +++ b/federation/package.json @@ -8,7 +8,7 @@ "license": "Apache-2.0", "private": false, "scripts": { - "build": "ts-node ./esbuild.config.ts && mkdirp build/templates/ && ncp ../core/src/emails/templates build/templates", + "build": "ts-node ./esbuild.config.ts && mkdirp build/templates/ && ncp ../core/build/templates build/templates", "start": "cross-env TZ=UTC NODE_ENV=production node build/index.js", "start:bun": "cross-env TZ=UTC NODE_ENV=production bun build/index.js", "dev": "cross-env TZ=UTC nodemon -w src --ext ts,json,css -r tsconfig-paths/register src/index.ts",