-
Notifications
You must be signed in to change notification settings - Fork 218
83 lines (67 loc) · 2.44 KB
/
documentation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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