Skip to content

Commit

Permalink
feat(docs-deploy): deploy docusaurus on github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
greyy-nguyen committed Dec 7, 2024
1 parent 382edfb commit 6457036
Show file tree
Hide file tree
Showing 8 changed files with 112 additions and 19 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion docs/.all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ package-lock.json
.docusaurus/
docs/chatbot-api/*.mdx
docs/chatbot-api/sidebar.ts
build/
33 changes: 28 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,33 @@
# EzHr-Chatbot LLM-based Assistant
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

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)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lekiet1214"><img src="https://avatars.githubusercontent.com/u/50958432?v=4?s=100" width="100px;" alt="Le Kiet"/><br /><sub><b>Le Kiet</b></sub></a><br /><a href="#blog-lekiet1214" title="Blogposts">📝</a> <a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/issues?q=author%3Alekiet1214" title="Bug reports">🐛</a> <a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/commits?author=lekiet1214" title="Code">💻</a> <a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/commits?author=lekiet1214" title="Documentation">📖</a> <a href="#example-lekiet1214" title="Examples">💡</a> <a href="#ideas-lekiet1214" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-lekiet1214" title="Maintenance">🚧</a> <a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/pulls?q=is%3Apr+reviewed-by%3Alekiet1214" title="Reviewed Pull Requests">👀</a> <a href="#security-lekiet1214" title="Security">🛡️</a> <a href="#tutorial-lekiet1214" title="Tutorials">✅</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lelouvincx"><img src="https://avatars.githubusercontent.com/u/40534905?v=4?s=100" width="100px;" alt="lelouvincx"/><br /><sub><b>lelouvincx</b></sub></a><br /><a href="#question-lelouvincx" title="Answering Questions">💬</a> <a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/issues?q=author%3Alelouvincx" title="Bug reports">🐛</a> <a href="#business-lelouvincx" title="Business development">💼</a> <a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/commits?author=lelouvincx" title="Code">💻</a> <a href="#content-lelouvincx" title="Content">🖋</a> <a href="#data-lelouvincx" title="Data">🔣</a> <a href="#design-lelouvincx" title="Design">🎨</a> <a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/commits?author=lelouvincx" title="Documentation">📖</a> <a href="#eventOrganizing-lelouvincx" title="Event Organizing">📋</a> <a href="#ideas-lelouvincx" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-lelouvincx" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-lelouvincx" title="Maintenance">🚧</a> <a href="#platform-lelouvincx" title="Packaging/porting to new platform">📦</a> <a href="#projectManagement-lelouvincx" title="Project Management">📆</a> <a href="#research-lelouvincx" title="Research">🔬</a> <a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/pulls?q=is%3Apr+reviewed-by%3Alelouvincx" title="Reviewed Pull Requests">👀</a> <a href="#tool-lelouvincx" title="Tools">🔧</a> <a href="#tutorial-lelouvincx" title="Tutorials">✅</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.tuantrann.work/"><img src="https://avatars.githubusercontent.com/u/94174684?v=4?s=100" width="100px;" alt="Trần Ngọc Tuấn"/><br /><sub><b>Trần Ngọc Tuấn</b></sub></a><br /><a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/issues?q=author%3Atuantran0910" title="Bug reports">🐛</a> <a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/commits?author=tuantran0910" title="Code">💻</a> <a href="#data-tuantran0910" title="Data">🔣</a> <a href="#design-tuantran0910" title="Design">🎨</a> <a href="#infra-tuantran0910" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-tuantran0910" title="Maintenance">🚧</a> <a href="#research-tuantran0910" title="Research">🔬</a> <a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/pulls?q=is%3Apr+reviewed-by%3Atuantran0910" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://greyyt.github.io/"><img src="https://avatars.githubusercontent.com/u/118145239?v=4?s=100" width="100px;" alt="Nhan Nguyen"/><br /><sub><b>Nhan Nguyen</b></sub></a><br /><a href="#question-greyyT" title="Answering Questions">💬</a> <a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/issues?q=author%3AgreyyT" title="Bug reports">🐛</a> <a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/commits?author=greyyT" title="Code">💻</a> <a href="#data-greyyT" title="Data">🔣</a> <a href="#design-greyyT" title="Design">🎨</a> <a href="#ideas-greyyT" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-greyyT" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-greyyT" title="Maintenance">🚧</a> <a href="#research-greyyT" title="Research">🔬</a> <a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/pulls?q=is%3Apr+reviewed-by%3AgreyyT" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vn01122003"><img src="https://avatars.githubusercontent.com/u/63691111?v=4?s=100" width="100px;" alt="TrungLune"/><br /><sub><b>TrungLune</b></sub></a><br /><a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/commits?author=vn01122003" title="Code">💻</a> <a href="#ideas-vn01122003" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-vn01122003" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-vn01122003" title="Maintenance">🚧</a> <a href="#research-vn01122003" title="Research">🔬</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/TranThang0801"><img src="https://avatars.githubusercontent.com/u/150577636?v=4?s=100" width="100px;" alt="Trần Xuân Thắng"/><br /><sub><b>Trần Xuân Thắng</b></sub></a><br /><a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/issues?q=author%3ATranThang0801" title="Bug reports">🐛</a> <a href="#data-TranThang0801" title="Data">🔣</a> <a href="#ideas-TranThang0801" title="Ideas, Planning, & Feedback">🤔</a> <a href="#research-TranThang0801" title="Research">🔬</a> <a href="https://github.com/TinhHoaSolutions-EzHR/chatbot/commits?author=TranThang0801" title="Tests">⚠️</a> <a href="#userTesting-TranThang0801" title="User Testing">📓</a></td>
</tr>
</tbody>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

6 changes: 3 additions & 3 deletions docs/blog/highLevelArchitecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<img src="/img/highLevelArchitecture/architecture.png" alt="Architecture" />
<img src={Architecture} alt="Architecture" />

## Architecture Diagram

Expand Down
10 changes: 6 additions & 4 deletions docs/blog/namingConvention.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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**.

<img src="/img/namingConventions/semantic-release.jpg" alt="Commit Conventions" />
import SemanticRelease from "@site/static/img/namingConventions/semantic-release.jpg";

<img src={SemanticRelease} alt="Commit Conventions" />

---

Expand Down Expand Up @@ -130,7 +130,9 @@ Examples:

Using semantic and structured commit messages ensures readability, consistency, and compatibility with Semantic Release tools, enabling automated versioning.

<img src="/img/namingConventions/git-naming-convention.png" alt="Commit Conventions" />
import NamingConventions from "@site/static/img/namingConventions/git-naming-convention.png";

<img src={NamingConventions} alt="Commit Conventions" />

### Commit Message Structure

Expand Down
14 changes: 8 additions & 6 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,23 @@ 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",
staticDirectories: ["static"],

// 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: [
[
Expand All @@ -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],
Expand Down
4 changes: 4 additions & 0 deletions docs/src/pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

---
## Contributors

Expand Down

0 comments on commit 6457036

Please sign in to comment.