Skip to content

Updated the notebooks #127

Updated the notebooks

Updated the notebooks #127

Workflow file for this run

name: Build and Deploy Docs
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "docs-deployment"
cancel-in-progress: false
jobs:
build-and-deploy:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install dependencies for docs
run: |
export SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build Sphinx docs
run: |
cd docs
make clean
make html
sphinx-build -W -b html source _build/html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html
- name: Pull latest gh-pages
run: |
git clone https://github.com/${{ github.repository }}.git --branch gh-pages --single-branch gh-pages
ls
- name: Copy new docs into gh-pages
if: (contains(github.ref, 'development') || contains(github.ref, 'main'))
run: |
rm -rf gh-pages/*
cp -r docs/_build/html/* gh-pages/
- name: Configure Git user
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "github-actions@github.com"
- name: Check for changes
run: |
cd gh-pages
git add .
git diff-index --quiet HEAD || git commit -m "Update documentation"
- name: Push to gh-pages
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
run: |
cd gh-pages
git add .
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} gh-pages
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages