diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 0772402..1e63e92 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,27 +1,24 @@ -name: documentation +name: "Sphinx: Render docs" -on: [push, pull_request, workflow_dispatch] - -permissions: - contents: write +on: push jobs: - docs: + build: runs-on: ubuntu-latest + permissions: + contents: write steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - - name: Install dependencies - run: | - pip install sphinx furo sphinx-changelog - - name: Sphinx build - run: | - sphinx-build docs/source _build - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - with: - publish_branch: gh-pages - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: _build/ - force_orphan: true \ No newline at end of file + - uses: actions/checkout@v4 + - name: Build HTML + uses: ammaraskar/sphinx-action@master + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: html-docs + path: docs/build/html/ + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/build/html \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 93cff90..039d1ed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,3 +9,7 @@ numpy==1.24.3 pandas==2.0.3 scikit_learn==1.3.0 scipy==1.12.0 + +# Sphinx requirements +furo +sphinx-changelog \ No newline at end of file