-
Notifications
You must be signed in to change notification settings - Fork 217
56 lines (45 loc) · 1.57 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
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
- 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: Build documentation
run: |
sphinx-build -b html ./docs/source/ ./docs/build/ -v
ls -l ./docs/build/ # List output files for debugging
- 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 # Ensure this is the branch for GitHub Pages
publish_dir: ./docs/build/
user_name: github-actions[bot] # Automated commit user name
user_email: github-actions[bot]@users.noreply.github.com
- name: Debug Output
run: |
pwd # Print the current working directory
ls -l # List files in the current directory
cat ./docs/source/conf.py # Show Sphinx config file for debugging