From 4e61fa607e65d249b0e619680d6009f191fd542b Mon Sep 17 00:00:00 2001 From: Ajinkya Indulkar <26824103+ajndkr@users.noreply.github.com> Date: Thu, 23 Nov 2023 00:54:17 +0530 Subject: [PATCH] feat(docs): add mkdocs (#153) * :heavy_plus_sign: add docs dependencies * :bento: add doc assets * :lipstick: add custom css * :wrench: add mkdocs.yml * :bento: update assets * :memo: update README * :wrench: update mkdocs.yml * :memo: add home page * :bento: add doc assets * :memo: remove documentation badge * :construction_worker: add workflow to publish docs * :lipstick: update primary color * :construction: test deployment * :wrench: add CNAME * :construction_worker: update GA workflow * :memo: update README * :heavy_plus_sign: add docs dependency * :wrench: update mkdocs.yml * :lipstick: update css * :memo: update home page * :memo: add getting started page * :bug: fix callback handler bug * :memo: update code --- .github/workflows/docs.yaml | 45 +++ README.md | 20 +- assets/logo-dark-mode.png | Bin 0 -> 89577 bytes assets/logo-light-mode.png | Bin 0 -> 85271 bytes assets/logo.png | Bin 40346 -> 0 bytes docs/CNAME | 1 + docs/assets/favicon.png | Bin 0 -> 1578 bytes docs/assets/icon.svg | 9 + docs/assets/logo-dark-mode.png | Bin 0 -> 89577 bytes docs/assets/logo-light-mode.png | Bin 0 -> 85271 bytes docs/getting-started.md | 108 +++++++ docs/index.md | 46 +++ docs/stylesheets/extra.css | 49 ++++ lanarky/adapters/langchain/callbacks.py | 2 +- mkdocs.yml | 77 +++++ poetry.lock | 368 +++++++++++++++++++++++- pyproject.toml | 6 + 17 files changed, 725 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/docs.yaml create mode 100644 assets/logo-dark-mode.png create mode 100644 assets/logo-light-mode.png delete mode 100644 assets/logo.png create mode 100644 docs/CNAME create mode 100644 docs/assets/favicon.png create mode 100644 docs/assets/icon.svg create mode 100644 docs/assets/logo-dark-mode.png create mode 100644 docs/assets/logo-light-mode.png create mode 100644 docs/getting-started.md create mode 100644 docs/index.md create mode 100644 docs/stylesheets/extra.css create mode 100644 mkdocs.yml diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..8cc9876 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,45 @@ +name: Docs + +on: + push: + branches: + - main + +permissions: + contents: write + +env: + PYTHON_VERSION: 3.9 + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Configure Git Credentials + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Update Environment Variables + run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + + - name: Setup Cache + uses: actions/cache@v3 + with: + key: mkdocs-material-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs-material- + + - name: Deploy GitHub Pages + run: | + pip install mkdocs-material mdx-include termynal + mkdocs gh-deploy --force diff --git a/README.md b/README.md index 5dc6b41..863f146 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@