Skip to content

Merge pull request #473 from shankarpandala/master #36

Merge pull request #473 from shankarpandala/master

Merge pull request #473 from shankarpandala/master #36

Workflow file for this run

name: "Pull Request Docs Check"
on:
pull_request:
push:
branches:
- dev
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # Updated to v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x' # Specify the Python version you need
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx
pip install -r requirements.txt # Ensure you have a requirements file for Sphinx
- name: Build documentation
run: |
sphinx-build docs docs/_build/html
- uses: actions/upload-artifact@v3
with:
name: DocumentationHTML
path: docs/_build/html/
- name: Commit documentation changes
run: |
git clone https://github.com/shankarpandala/lazypredict.git --branch gh-pages --single-branch gh-pages
cp -r docs/_build/html/* gh-pages/
cd gh-pages
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# the return code.
- name: Push changes
uses: ad-m/[email protected] # Updated to a specific version
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}