-
Notifications
You must be signed in to change notification settings - Fork 7
32 lines (31 loc) · 1 KB
/
gh-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: docs
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- name: Dependencies
run: |
if [ -f pyproject.toml ]; then pip install ".[docs]"; fi
- name: Clear notebooks and create conf.py file
run: |
jupyter-book config sphinx docs/
jupyter nbconvert --ClearOutputPreprocessor.enabled=True --ClearMetadataPreprocessor.enabled=True --clear-output --inplace $(find . -type f -name '*.ipynb')
- name: Build Sphinx Documentation
run: |
sphinx-build docs _build/html -b html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' && job.status == 'success'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
enable_jekyll: false