Skip to content

Update build

Update build #71

Workflow file for this run

name: Deploy Documentation
on:
push:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install Pandoc
run: sudo apt-get install -y pandoc # Install Pandoc
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
pip install jupyter # Install Jupyter for kernel management
python -m ipykernel install --user --name=python3 # Ensure the python3 kernel is available
- name: Generate .rst files
run: sphinx-apidoc -o docs/source/ ../EMToolKit/
- name: Build documentation
run: sphinx-build -v -b html docs/source/ docs/build/html
- name: Upload documentation as artifact
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/build/html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
publish_branch: gh-pages
- name: Trigger Read the Docs build
run: |
curl -X POST -d '' "https://readthedocs.org/api/v2/webhook/EMToolKit/github/" \
-H "Authorization: token ${{ secrets.RTD_API_TOKEN }}"