diff --git a/.github/workflows/build-healthchat.yaml b/.github/workflows/build-healthchat.yaml index c6f8caf28b..1169b2a088 100644 --- a/.github/workflows/build-healthchat.yaml +++ b/.github/workflows/build-healthchat.yaml @@ -25,6 +25,29 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # needed for docker-package to be able to calculate the version + - name: Checkout healthchat-workspace + uses: actions/checkout@v4 + with: + repository: Novaloop-AG/healthchat-workspace + path: healthchat-workspace + token: ${{ secrets.HEALTHCHAT_WORKSPACE_TOKEN }} + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Build element-plugin + run: | + cd healthchat-workspace/element-plugin + npm ci + npm run build + cd module + npm ci + npm run build + - name: Stage plugin artifacts for Docker + run: | + mkdir -p plugin-dist/elements + cp healthchat-workspace/element-plugin/module/dist/healthchat-module.js plugin-dist/healthchat-module.js + cp healthchat-workspace/element-plugin/dist/elements/browser/main.js plugin-dist/elements/healthchat-elements.js - name: Log in to the Github Container registry uses: docker/login-action@v3 with: diff --git a/.gitignore b/.gitignore index 694b9e6201..394ed1a1fe 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,5 @@ storybook-static /packages/shared-components/node_modules /packages/shared-components/dist /packages/shared-components/src/i18nKeys.d.ts + +/plugin-dist diff --git a/Dockerfile b/Dockerfile index 675f900b96..749a9b388d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,11 @@ RUN /src/scripts/docker-link-repos.sh RUN yarn --network-timeout=200000 install RUN /src/scripts/docker-package.sh +# Copy HealthChat plugin artifacts +RUN mkdir -p /src/webapp/modules/elements +COPY plugin-dist/healthchat-module.js /src/webapp/modules/healthchat-module.js +COPY plugin-dist/elements/healthchat-elements.js /src/webapp/modules/elements/healthchat-elements.js + # Copy the config now so that we don't create another layer in the app image RUN cp /src/config.sample.json /src/webapp/config.json