diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 8ab967646..8f34c6115 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -23,12 +23,25 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - uses: actions/checkout@v4 - - name: Use Node.js + + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: '21' + distribution: 'temurin' + cache: 'maven' + + - name: Generate Javadoc + run: mvn javadoc:aggregate -DskipTests + + - name: Set up Node.js uses: actions/setup-node@v3 with: node-version: '20.x' + - run: cd docs && npm ci - run: cd docs && npm run build + - run: cp -R target/site/apidocs docs/build/ - name: Setup Pages uses: actions/configure-pages@v3 diff --git a/docs/build.sh b/docs/build.sh new file mode 100755 index 000000000..a602c00c6 --- /dev/null +++ b/docs/build.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +npm ci + +npm run build \ No newline at end of file diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 2646974c6..7f5e2af9a 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -86,7 +86,11 @@ const config = { }, {to: '/docs/tutorials', label: 'Tutorials', position: 'left'}, {to: '/docs/category/integrations', label: 'Integrations', position: 'left'}, - {to: 'https://lizeraes.github.io/langchain4j/apidocs/', label: 'Javadoc', position: 'left'}, + { + href: 'https://langchain4j.github.io/langchain4j/apidocs/index.html', + label: 'Javadoc', + position: 'left' + }, {to: '/blog', label: 'Blog', position: 'left'}, { href: 'https://github.com/langchain4j/langchain4j', @@ -119,8 +123,8 @@ const config = { href: 'https://discord.com/invite/JzTFvyjG6R', }, { - label: 'Stack Overflow', - href: 'https://stackoverflow.com/questions/tagged/langchain4j', + label: 'Stack Overflow', + href: 'https://stackoverflow.com/questions/tagged/langchain4j', }, ], }, diff --git a/docs/start.sh b/docs/start.sh new file mode 100755 index 000000000..3828d8cba --- /dev/null +++ b/docs/start.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +npm ci + +npm run start \ No newline at end of file