diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68d872026..9f90741ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -154,6 +154,51 @@ jobs: name: sdist path: bld/sdist + docs: + runs-on: ubuntu-20.04 + needs: [sdist] + steps: + - name: Check out repo + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.9" + - name: Download sdist artifact + uses: actions/download-artifact@v4 + with: + name: sdist + path: bld/sdist + - name: Build docs + id: build_docs + continue-on-error: true + run: | + python -m pip install --upgrade pip setuptools wheel + install_file=$(echo bld/sdist/interpret_core-*.tar.gz) + install_file=$(basename "$install_file" .tar.gz) + python -m pip install "bld/sdist/$install_file.tar.gz[debug,notebook,plotly,lime,sensitivity,shap,linear,treeinterpreter,aplr,dash,skoperules,testing]" + cd "docs/" + pip install -r requirements.txt + /bin/sh ./build.sh + - name: Mark step with a warning + if: ${{ steps.build_docs.outcome == 'failure' }} + uses: actions/github-script@v6 + with: + script: | + github.rest.checks.create({ + owner: context.repo.owner, + repo: context.repo.repo, + name: 'Failed building docs', + head_sha: context.sha, + status: 'completed', + conclusion: 'neutral' + }) + - name: Publish docs + uses: actions/upload-artifact@v4 + with: + name: docs + path: docs/interpret/_build/html/ + bdist: runs-on: ubuntu-20.04 needs: [bld, vis]