Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Minimal Sphinx docs build + deploy workflow
# - Adjust `working-directory` or the `make -C` path to point where your Makefile lives.
# - Ensure docs/requirements.txt exists or set pip install fallback packages.
name: docs

on:
push:
branches: [ main ]
pull_request:
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Upgrade pip
run: python -m pip install --upgrade pip

- name: Install docs dependencies
run: |
if [ -f docs/requirements.txt ]; then
pip install -r docs/requirements.txt
else
pip install sphinx sphinx-rtd-theme
fi

- name: Build docs (make html)
# run from repo root and invoke Makefile in docs/; change -C if Makefile is at repo root
run: make -C docs html
# If your Makefile is at repo root and SOURCEDIR points to docs/source, use: run: make html

- name: Copy built html for pages
run: |
mkdir -p _site
cp -r docs/build/html/* _site/

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v1
7 changes: 7 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Python dependencies for building STRling documentation
sphinx
sphinx_rtd_theme
numpy
pandas
scipy
statsmodels
Loading