Skip to content

actions to automatically update documentation 🐛 #11

actions to automatically update documentation 🐛

actions to automatically update documentation 🐛 #11

name: Update Documentation
on:
push:
branches:
- miguel/jupyter_book
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install --upgrade pip setuptools wheel
pip install --no-use-pep517 lightfm
pip install .
pip install -r docs/requirements-doc.txt
- name: Build documentation
run: |
jupyter-book build docs
- name: Configure Git
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git config user.signingkey "${{ secrets.GPG_KEY_ID }}"
- name: Create and switch to gh-pages branch
run: |
git checkout -b gh-pages
git pull origin gh-pages || true
- name: Copy built documentation
run: cp -r docs/_build/html/* .
- name: Add and commit changes
run: |
git add * -f
git commit -m "Update documentation"
- name: Push changes to gh-pages
run: git push origin gh-pages