diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..9e75ee07 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,58 @@ +name: Build Documentation + +on: + push: + branches: + - master + - release-* + - v* + pull_request: + branches: + - master + +jobs: + build-docs: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install pandoc + run: | + sudo apt-get update + sudo apt-get install -y pandoc + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r docs/requirements.txt + + - name: Build documentation + run: | + cd docs + make html + + - name: Check for build errors + run: | + if [ -d docs/_build/html ]; then + echo "Documentation built successfully" + ls -la docs/_build/html + else + echo "Documentation build failed" + exit 1 + fi + + - name: Upload documentation artifacts + uses: actions/upload-artifact@v4 + with: + name: documentation-html + path: docs/_build/html/ + retention-days: 30 diff --git a/docs/requirements.txt b/docs/requirements.txt index 99f7f5bb..8d232ac4 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -4,4 +4,4 @@ sphinx_rtd_theme ipykernel nbsphinx pygments>=2.6.1 -smurff>=0.17.0<0.18.0 +smurff==1.0 diff --git a/readthedocs.yaml b/readthedocs.yaml index 21a38194..41f71059 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -5,6 +5,12 @@ # Required version: 2 +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-24.04 + tools: + python: "3.12" + # Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/conf.py @@ -19,6 +25,5 @@ formats: # Optionally set the version of Python and requirements required to build your docs python: - version: 3.7 install: - - requirements: docs/requirements.txt \ No newline at end of file + - requirements: docs/requirements.txt