-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
485 additions
and
387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- xiaoyi_doc # Ensure this is the branch where you commit documentation updates | ||
|
||
permissions: | ||
contents: write | ||
actions: read | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Ensure full git history is fetched | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
- name: Install dependencies using Poetry | ||
run: | | ||
poetry config virtualenvs.create false | ||
poetry install | ||
- name: List installed packages | ||
run: | | ||
poetry run pip list | ||
- name: Print Sphinx version | ||
run: | | ||
poetry run sphinx-build --version | ||
- name: Build documentation | ||
run: | | ||
echo "Current Working Directory: $(pwd)" | ||
echo "Python path before Sphinx build: $PYTHONPATH" | ||
poetry run sphinx-build -b html ./docs/source/ ./docs/build/ -vvv | ||
echo "Listing detailed contents of build directory:" | ||
find ./docs/build/ -type f | ||
- name: Test module import | ||
run: | | ||
poetry run python -c "import lightrag; print('Lightrag module loaded from:', lightrag.__file__)" | ||
- name: Print effective Sphinx conf | ||
run: | | ||
poetry run python -c "from sphinx.config import Config; config = Config.read('./docs/source/conf.py'); print(config.values)" | ||
- name: Check API documentation files | ||
run: | | ||
echo "Checking API documentation directory for components:" | ||
ls -la ./docs/build/apis/components/ | ||
- name: Create .nojekyll file | ||
run: | | ||
touch ./docs/build/.nojekyll | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: gh-pages | ||
publish_dir: ./docs/build/ | ||
user_name: github-actions[bot] | ||
user_email: github-actions[bot]@users.noreply.github.com | ||
|
||
- name: Debug Output | ||
run: | | ||
pwd # Print the current working directory | ||
ls -l ./docs/build/ # List files in the build directory | ||
cat ./docs/source/conf.py # Show Sphinx config file for debugging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
pydata-sphinx-theme==0.15.2 | ||
Sphinx==7.3.7 | ||
sphinx_design==0.6.0 | ||
sphinx-copybutton==0.5.2 | ||
pydata-sphinx-theme==0.15.3 | ||
sphinx-design==0.6.0 | ||
sphinx-copybutton==0.5.2 | ||
sphinx==7.3.7 | ||
nbsphinx==0.9.4 | ||
nbconvert==7.16.4 | ||
PyYAML | ||
readthedocs-sphinx-search==0.3.2 | ||
numpy | ||
tqdm | ||
tiktoken |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.