diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..692ae53 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,37 @@ +name: Build and Deploy Docs + +on: + push: + branches: + - main + paths: + - 'asrpy/**' + - 'setup.py' + +jobs: + build-docs: + 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.10' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e . + pip install pdoc3 + + - name: Generate HTML docs + run: pdoc3 --html --output-dir docs asrpy -f -c sort_identifiers=False + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/asrpy # pdoc3 puts output in docs/asrpy by default