Skip to content

Commit

Permalink
debug workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanlchristensen committed Nov 3, 2024
1 parent 07167ab commit 80ce90d
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
Expand All @@ -23,6 +22,36 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx-rtd-theme
pip install -r requirements.txt
- name: Setup Sphinx documentation structure
run: |
# Create docs directory if it doesn't exist
mkdir -p docs
cd docs
# Only initialize sphinx if conf.py doesn't exist
if [ ! -f "conf.py" ]; then
# Create default sphinx structure non-interactively
sphinx-quickstart -q -p "Your Project Name" -a "Your Name" -v 1.0 -r 1.0 -l en --ext-autodoc --ext-viewcode --makefile --batchfile --sep
# Update conf.py with some common settings
echo "import os" >> conf.py
echo "import sys" >> conf.py
echo "sys.path.insert(0, os.path.abspath('..'))" >> conf.py
echo "html_theme = 'sphinx_rtd_theme'" >> conf.py
# Create a basic index.rst if it doesn't exist
if [ ! -f "index.rst" ]; then
echo "Welcome to Your Project's documentation!" > index.rst
echo "=====================================" >> index.rst
echo "" >> index.rst
echo ".. toctree::" >> index.rst
echo " :maxdepth: 2" >> index.rst
echo " :caption: Contents:" >> index.rst
echo "" >> index.rst
fi
fi
- name: Generate Documentation
run: |
Expand Down

0 comments on commit 80ce90d

Please sign in to comment.