-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.36 KB
/
doc.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: BuildDoc
on:
push:
branches:
- '**'
tags-ignore:
- '*.*.*'
jobs:
build:
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, 'build-doc')"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.11.0'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.2.0
virtualenvs-create: true
virtualenvs-in-project: true
- name: Set up cache
uses: actions/cache@v2
id: cached-poetry-dependencies
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Build the notebook index.html
run: |
source .venv/bin/activate
mkdir _build
python -m jupyter nbconvert --to html example.ipynb --ExecutePreprocessor.kernel_name=python --ExecutePreprocessor.enabled=True --output=_build/index.html
- name: GitHub Pages action
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/