Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fochan committed Jan 6, 2025
2 parents 7fdbff7 + 7dfd801 commit 315f7ac
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 5 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build-the-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build the Docs
on:
push:
branches:
- develop
- main
jobs:
deploy:
runs-on: ubuntu-latest
env:
S3_DIR: genai

steps:
- uses: actions/checkout@v4

- run: ./containthedocs-build.sh

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Copy files to s3 (Staging Clouddocs)
if:
github.ref == 'refs/heads/develop'
run: |
aws s3 sync --delete $PWD/docs/_build/html/ s3://clouddocs.f5networks.net/training/community/$S3_DIR/html/
- name: Copy files to s3 (Production Clouddocs)
if:
github.ref == 'refs/heads/main'
run: |
aws s3 sync --delete $PWD/docs/_build/html/ s3://clouddocs.f5.com/training/community/$S3_DIR/html/
51 changes: 51 additions & 0 deletions .github/workflows/check-the-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Check the Docs
on:
pull_request: {}
push:
branches:
- develop
- master
workflow_dispatch: {}

jobs:
grammer:
name: Check Grammer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Log the node version
run: |
node -v
- name: Install write-good
run: |
npm install --no-fund --location=global write-good
- name: Run write-good to check grammer
run: |
write-good `find ./docs -name '*.rst'` --so
spelling:
name: Check Spelling
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Install dependencies
run: |
sudo apt update && sudo apt install -y enchant
pip install -r requirements.txt
pip install sphinxcontrib-spelling
- name: Run spell checker
run: |
sphinx-build -b spelling -d docs/_build docs/ docs/_build/spelling
if [[ -s "docs/_build/spelling/index.spelling" ]]; then cat "docs/_build/spelling/index.spelling"; fi
- name: Spelling errors fail the build
# fail the build in case of any misspelled words
run: |
if [[ -s "docs/_build/spelling/index.spelling" ]]; then cat "docs/_build/spelling/index.spelling"; fi
if [[ -s "docs/_build/spelling/index.spelling" ]]; then false; fi
7 changes: 3 additions & 4 deletions containthedocs-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

set -x

COMMAND="make -C docs html"

COMMAND=(/bin/bash -c "sudo pip install -r requirements.txt -U ; make -C docs clean html")

. ./containthedocs-image

exec sudo docker run --rm -it \
exec docker run --rm -t \
-v "$PWD":"$PWD" --workdir "$PWD" \
${DOCKER_RUN_ARGS} \
-e "LOCAL_USER_ID=$(id -u)" \
${DOC_IMG} ${COMMAND}
${DOC_IMG} "${COMMAND[@]}"
2 changes: 1 addition & 1 deletion docs/class4/class4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In previous class, you successfully build a GenAI RAG chatbot using langchain fr

To embed the chatbot into the arcadia trading platform, we will insert code snippet from flowise AI into our code.

From Flowise AI, copy the embeded code snippet into a text editor or nodepad.
From Flowise AI, copy the embeded code snippet into a text editor or notepad.


.. image:: ./_static/class4-1.png
Expand Down

0 comments on commit 315f7ac

Please sign in to comment.