Skip to content

debug workflow

debug workflow #41

Workflow file for this run

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
- 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: Check working directory and conf.py existence
run: |
echo "Current Working Directory: $(pwd)"
ls -la ./docs/source/
if [ -f "./docs/source/conf.py" ]; then
echo "conf.py found."
else
echo "conf.py not found."
fi
- name: Build documentation
run: |
echo "Python path before Sphinx build: $PYTHONPATH"
poetry run sphinx-build -b html ./docs/source/ ./docs/build/ -vvv
working-directory: ${{ github.workspace }}
- name: List built documentation
run: |
find ./docs/build/ -type f
- 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