Skip to content

Commit

Permalink
sphinxdoc deploy (#2)
Browse files Browse the repository at this point in the history
* fix sphinxdoc yaml

* fix link to doc

---------

Co-authored-by: hs <[email protected]>
  • Loading branch information
ployts and ployts authored Sep 12, 2024
1 parent f60cf00 commit 2e35f8c
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 14 deletions.
62 changes: 55 additions & 7 deletions .github/workflows/deploy_sphinx_docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Sphinx documentation to Pages
name: deploy-sphinx-documentation-to-pages

on:
pull_request:
Expand All @@ -15,16 +15,63 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
- name: Setup Python
uses: actions/setup-python@master
with:
python_version: ${{ matrix.python-version }}
- name: Install dependencies
python-version: '3.10'
- name: Choose Pandoc
shell: bash
run: |
case $RUNNER_OS in
"Linux")
printf 'INSTALLER_SUFFIX=1-amd64.deb' >> $GITHUB_ENV
;;
"macOS")
printf 'INSTALLER_SUFFIX=macOS.pkg' >> $GITHUB_ENV
;;
*)
printf 'Do not know how to install pandoc on %s\n' "$RUNNER_OS"
exit 1
;;
esac
- name: Download Pandoc
shell: bash
env:
GITHUB_TOKEN: ${{ github.token }}
REPO: jgm/pandoc
DOWNLOAD_URL: 'https://github.com/jgm/pandoc/releases/download/'
run: |
gh release download ${{ inputs.version }} \
--repo "$REPO" \
--pattern '*'${{ env.INSTALLER_SUFFIX }}
printf 'INSTALLER_VERSION=%s' \
"$(ls pandoc-*-${{ env.INSTALLER_SUFFIX }} | \
sed 's/pandoc-\([0-9.]*\)-.*/\1/')" \
>> $GITHUB_ENV
- name: Install Pandoc
shell: bash
env:
INSTALLER: pandoc-${{ env.INSTALLER_VERSION }}-${{ env.INSTALLER_SUFFIX }}
run: |
case $RUNNER_OS in
"Linux")
sudo apt install ./$INSTALLER
;;
"macOS")
sudo installer -pkg ./$INSTALLER -target '/'
;;
*)
echo "$RUNNER_OS not supported"
exit 1
;;
esac
rm $INSTALLER
- name: Install Sphinx Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r docs/sphinx_doc/requirements.txt
- id: build
name: Build Documentation
- name: Build Documentation
run: |
cd docs/sphinx_doc
bash build_sphinx_doc.sh
Expand All @@ -33,7 +80,8 @@ jobs:
with:
name: SphinxDoc
path: 'docs/sphinx_doc/build/html'
- uses: peaceiris/actions-gh-pages@v3
- name: Push Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Equip your LLM chatbot with a powerful and flexible long term memory system.
[![](https://img.shields.io/badge/python-3.10+-blue)](https://pypi.org/project/memoryscope/)
[![](https://img.shields.io/badge/pypi-v0.1.1.0-blue?logo=pypi)](https://pypi.org/project/memoryscope/)
[![](https://img.shields.io/badge/license-Apache--2.0-black)](./LICENSE)
[![](https://img.shields.io/badge/Docs-English%7C%E4%B8%AD%E6%96%87-blue?logo=markdown)](https://modelscope.github.io/memoryscope/#welcome-to-memoryscope-tutorial-hub)
[![](https://img.shields.io/badge/Docs-API_Reference-blue?logo=markdown)](https://modelscope.github.io/memoryscope/)
[![](https://img.shields.io/badge/Contribute-Welcome-green)](https://modelscope.github.io/memoryscope/tutorial/contribute.html)
[![](https://img.shields.io/badge/Docs-English%7C%E4%B8%AD%E6%96%87-blue?logo=markdown)](https://modelscope.github.io/MemoryScope/en/index.html#welcome-to-memoryscope-tutorial)
[![](https://img.shields.io/badge/Docs-API_Reference-blue?logo=markdown)](https://modelscope.github.io/MemoryScope/en/docs/api.html)
[![](https://img.shields.io/badge/Contribute-Welcome-green)](https://modelscope.github.io/MemoryScope/en/docs/contribution.html)

----
## 📰 News
Expand Down
6 changes: 3 additions & 3 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
[![](https://img.shields.io/badge/python-3.10+-blue)](https://pypi.org/project/memoryscope/)
[![](https://img.shields.io/badge/pypi-v0.1.1-blue?logo=pypi)](https://pypi.org/project/memoryscope/)
[![](https://img.shields.io/badge/license-Apache--2.0-black)](./LICENSE)
[![](https://img.shields.io/badge/Docs-English%7C%E4%B8%AD%E6%96%87-blue?logo=markdown)](https://modelscope.github.io/memoryscope/#welcome-to-memoryscope-tutorial-hub)
[![](https://img.shields.io/badge/Docs-API_Reference-blue?logo=markdown)](https://modelscope.github.io/memoryscope/)
[![](https://img.shields.io/badge/Contribute-Welcome-green)](https://modelscope.github.io/memoryscope/tutorial/contribute.html)
[![](https://img.shields.io/badge/Docs-English%7C%E4%B8%AD%E6%96%87-blue?logo=markdown)](https://modelscope.github.io/MemoryScope/zh/index.html#id1)
[![](https://img.shields.io/badge/Docs-API_Reference-blue?logo=markdown)](https://modelscope.github.io/MemoryScope/zh/docs/api.html)
[![](https://img.shields.io/badge/Contribute-Welcome-green)](https://modelscope.github.io/MemoryScope/zh/docs/contribution.html)

<!-- 创空间
[![](https://img.shields.io/badge/ModelScope-Demos-4e29ff.svg?logo=data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjI0IDEyMS4zMyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCTxwYXRoIGQ9Im0wIDQ3Ljg0aDI1LjY1djI1LjY1aC0yNS42NXoiIGZpbGw9IiM2MjRhZmYiIC8+Cgk8cGF0aCBkPSJtOTkuMTQgNzMuNDloMjUuNjV2MjUuNjVoLTI1LjY1eiIgZmlsbD0iIzYyNGFmZiIgLz4KCTxwYXRoIGQ9Im0xNzYuMDkgOTkuMTRoLTI1LjY1djIyLjE5aDQ3Ljg0di00Ny44NGgtMjIuMTl6IiBmaWxsPSIjNjI0YWZmIiAvPgoJPHBhdGggZD0ibTEyNC43OSA0Ny44NGgyNS42NXYyNS42NWgtMjUuNjV6IiBmaWxsPSIjMzZjZmQxIiAvPgoJPHBhdGggZD0ibTAgMjIuMTloMjUuNjV2MjUuNjVoLTI1LjY1eiIgZmlsbD0iIzM2Y2ZkMSIgLz4KCTxwYXRoIGQ9Im0xOTguMjggNDcuODRoMjUuNjV2MjUuNjVoLTI1LjY1eiIgZmlsbD0iIzYyNGFmZiIgLz4KCTxwYXRoIGQ9Im0xOTguMjggMjIuMTloMjUuNjV2MjUuNjVoLTI1LjY1eiIgZmlsbD0iIzM2Y2ZkMSIgLz4KCTxwYXRoIGQ9Im0xNTAuNDQgMHYyMi4xOWgyNS42NXYyNS42NWgyMi4xOXYtNDcuODR6IiBmaWxsPSIjNjI0YWZmIiAvPgoJPHBhdGggZD0ibTczLjQ5IDQ3Ljg0aDI1LjY1djI1LjY1aC0yNS42NXoiIGZpbGw9IiMzNmNmZDEiIC8+Cgk8cGF0aCBkPSJtNDcuODQgMjIuMTloMjUuNjV2LTIyLjE5aC00Ny44NHY0Ny44NGgyMi4xOXoiIGZpbGw9IiM2MjRhZmYiIC8+Cgk8cGF0aCBkPSJtNDcuODQgNzMuNDloLTIyLjE5djQ3Ljg0aDQ3Ljg0di0yMi4xOWgtMjUuNjV6IiBmaWxsPSIjNjI0YWZmIiAvPgo8L3N2Zz4K)](https://modelscope.cn/studios?name=memoryscope&page=1&sort=latest)
Expand Down
1 change: 0 additions & 1 deletion docs/sphinx_doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ sphinxcontrib-mermaid
myst-parser
autodoc_pydantic
nbsphinx
Pandoc

0 comments on commit 2e35f8c

Please sign in to comment.