From 6457036ace08f6270a4c9b74b83e0d663cfb8755 Mon Sep 17 00:00:00 2001 From: greyy-nguyen Date: Sat, 7 Dec 2024 23:02:34 +0700 Subject: [PATCH] feat(docs-deploy): deploy docusaurus on github pages --- .github/workflows/docs-deploy.yml | 60 +++++++++++++++++++++++++++++ docs/.all-contributorsrc | 3 +- docs/.gitignore | 1 + docs/README.md | 33 +++++++++++++--- docs/blog/highLevelArchitecture.mdx | 6 +-- docs/blog/namingConvention.mdx | 10 +++-- docs/docusaurus.config.ts | 14 ++++--- docs/src/pages/index.md | 4 ++ 8 files changed, 112 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/docs-deploy.yml diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml new file mode 100644 index 00000000..8514ad89 --- /dev/null +++ b/.github/workflows/docs-deploy.yml @@ -0,0 +1,60 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + push: + branches: + - main + paths: + - "docs/**" # Only trigger if changes are made in the docs folder + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +env: + NODE_OPTIONS: --max-old-space-size=6144 + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: yarn + + - name: Install dependencies + run: | + cd docs + yarn install --frozen-lockfile --non-interactive + + - name: Build + run: | + cd docs + yarn build + + - name: Setup Pages + uses: actions/configure-pages@v3 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: docs/build # Update to the build output path + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/docs/.all-contributorsrc b/docs/.all-contributorsrc index ef2e5708..ba7ed209 100644 --- a/docs/.all-contributorsrc +++ b/docs/.all-contributorsrc @@ -4,7 +4,8 @@ "repoType": "github", "repoHost": "https://github.com", "files": [ - "src/pages/index.md" + "src/pages/index.md", + "README.md" ], "imageSize": 100, "commit": true, diff --git a/docs/.gitignore b/docs/.gitignore index 99766761..80aaa9d6 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -21,3 +21,4 @@ package-lock.json .docusaurus/ docs/chatbot-api/*.mdx docs/chatbot-api/sidebar.ts +build/ diff --git a/docs/README.md b/docs/README.md index d892c302..4a436a02 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,10 +1,33 @@ # EzHr-Chatbot LLM-based Assistant + +[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-) + This is the LLM-based assistant for the EzHr-Chatbot project. It makes use of RAG and LlamaIndex to provide a conversational interface for the users. -# THIS BRANCH IS FOR DOCUMENTATION PURPOSES ONLY -## [docs/chatbot-api](/docs/chatbot-api/) is automatically generated from the codebase. Do not edit it manually. -## If you need to update the API documentation, please update the [openapi.yaml](/static/openapi.yaml) file. -## You can use the [Swagger Editor](https://editor.swagger.io/) to edit the file. -## Cloudflare Workers will automatically update the API documentation from the openapi.yaml file. +## Contributors ✨ + +Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): + + + + + + + + + + + + + + + +
Le Kiet
Le Kiet

πŸ“ πŸ› πŸ’» πŸ“– πŸ’‘ πŸ€” 🚧 πŸ‘€ πŸ›‘οΈ βœ…
lelouvincx
lelouvincx

πŸ’¬ πŸ› πŸ’Ό πŸ’» πŸ–‹ πŸ”£ 🎨 πŸ“– πŸ“‹ πŸ€” πŸš‡ 🚧 πŸ“¦ πŸ“† πŸ”¬ πŸ‘€ πŸ”§ βœ…
TrαΊ§n Ngọc TuαΊ₯n
TrαΊ§n Ngọc TuαΊ₯n

πŸ› πŸ’» πŸ”£ 🎨 πŸš‡ 🚧 πŸ”¬ πŸ‘€
Nhan Nguyen
Nhan Nguyen

πŸ’¬ πŸ› πŸ’» πŸ”£ 🎨 πŸ€” πŸš‡ 🚧 πŸ”¬ πŸ‘€
TrungLune
TrungLune

πŸ’» πŸ€” πŸš‡ 🚧 πŸ”¬
TrαΊ§n XuΓ’n ThαΊ―ng
TrαΊ§n XuΓ’n ThαΊ―ng

πŸ› πŸ”£ πŸ€” πŸ”¬ ⚠️ πŸ““
+ + + + + + diff --git a/docs/blog/highLevelArchitecture.mdx b/docs/blog/highLevelArchitecture.mdx index 81bb36d6..5b406665 100644 --- a/docs/blog/highLevelArchitecture.mdx +++ b/docs/blog/highLevelArchitecture.mdx @@ -4,16 +4,16 @@ description: High-level architecture overview of the Large Language Model (LLM) date: 2024-11-30 authors: [lelouvincx, lekiet] tags: - - development + - development --- - +import Architecture from "@site/static/img/highLevelArchitecture/architecture.png"; ## Overview This document provides a high-level overview of the architecture for our Large Language Model (LLM) application, designed to assist back-office employees with intelligent query responses. The application leverages a combination of a large language model (LLM), document embedding, semantic search, and caching to deliver fast and accurate answers based on company documents. Each component is containerized, enabling scalability, modularity, and ease of deployment. -Architecture +Architecture ## Architecture Diagram diff --git a/docs/blog/namingConvention.mdx b/docs/blog/namingConvention.mdx index 7ab9b5d1..6a354751 100644 --- a/docs/blog/namingConvention.mdx +++ b/docs/blog/namingConvention.mdx @@ -5,13 +5,13 @@ date: 2024-11-30 authors: [lelouvincx, lekiet] tags: - development - --- - A well-defined Git naming convention enhances collaboration, supports automated versioning, and simplifies project maintenance. This document outlines recommended naming conventions for branches, commits, and tags to facilitate a smooth workflow and compatibility with **Semantic Release**. -Commit Conventions +import SemanticRelease from "@site/static/img/namingConventions/semantic-release.jpg"; + +Commit Conventions --- @@ -130,7 +130,9 @@ Examples: Using semantic and structured commit messages ensures readability, consistency, and compatibility with Semantic Release tools, enabling automated versioning. -Commit Conventions +import NamingConventions from "@site/static/img/namingConventions/git-naming-convention.png"; + +Commit Conventions ### Commit Message Structure diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 0de61f8c..f8ed7e04 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -8,11 +8,14 @@ import type * as OpenApiPlugin from "docusaurus-plugin-openapi-docs"; import remarkMath from "remark-math"; import rehypeKatex from "rehype-katex"; +const ORGANIZATION_NAME = "TinhHoaSolutions-EzHR"; +const PROJECT_NAME = "chatbot"; + const config: Config = { title: "EzHR Chatbot Local Development Guide", tagline: "EzHR Chatbot Documentation", - url: "https://ezhrchatbot.pages.dev/", - baseUrl: "/", + url: `https://${ORGANIZATION_NAME.toLowerCase()}.github.io`, + baseUrl: `/${PROJECT_NAME}/`, onBrokenLinks: "throw", onBrokenMarkdownLinks: "warn", favicon: "img/favicon.ico", @@ -20,8 +23,8 @@ const config: Config = { // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. - organizationName: "TinhHoaSolutions-EzHR", // Usually your GitHub org/username. - projectName: "chatbot", + organizationName: ORGANIZATION_NAME, + projectName: PROJECT_NAME, presets: [ [ @@ -31,8 +34,7 @@ const config: Config = { sidebarPath: require.resolve("./sidebars.ts"), // Please change this to your repo. // Remove this to remove the "edit this page" links. - editUrl: - "https://github.com/TinhHoaSolutions-EzHR/chatbot/tree/main/docs", + editUrl: `https://github.com/${ORGANIZATION_NAME}/${PROJECT_NAME}/tree/main/docs`, docItemComponent: "@theme/ApiItem", // Derived from docusaurus-theme-openapi remarkPlugins: [remarkMath], rehypePlugins: [rehypeKatex], diff --git a/docs/src/pages/index.md b/docs/src/pages/index.md index d175b7da..a20f8807 100644 --- a/docs/src/pages/index.md +++ b/docs/src/pages/index.md @@ -9,6 +9,10 @@ hide_table_of_contents: true This is the LLM-based assistant for the EzHr-Chatbot project. It makes use of RAG and LlamaIndex to provide a conversational interface for the users. + +[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-) + + --- ## Contributors