-
Notifications
You must be signed in to change notification settings - Fork 29
69 lines (56 loc) · 2.07 KB
/
docs.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Docs Build
on:
push:
branches:
- main
jobs:
build_docs:
runs-on: ubuntu-latest
env:
GIT_COMMITTER_NAME: "Doc Build Bot"
GIT_COMMITTER_EMAIL: "[email protected]"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements_docs.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install --upgrade pip
pip install .
pip install -r docs/requirements_docs.txt
# - name: Convert notebooks to HTML
# # if: ${{ github.event_name == 'push' && contains(github.event.head_commit.modified, 'Tutorial/') && contains(github.event.head_commit.modified, '.ipynb') }}
# run: |
# # jupyter nbconvert --to html --allow-errors --no-input --show-input --template classic --output-dir docs/tutorial Tutorial/*.ipynb
# jupyter nbconvert --to html --allow-errors --template classic --output-dir docs/tutorial Tutorial/*.ipynb
# - name: Build Tutorial Table of Contents
# run: |
# bash docs/scripts/build_tutorial_toc.sh
- name: Build Documentation sources
run: |
bash docs/scripts/build_docs_sources.sh
- name: Build mkdocs.yml
run: |
bash docs/scripts/build_mkdocs.sh
- name: Build and Deploy Latest Docs
run: |
mike deploy --push --branch gh-pages latest
- name: Build and Deploy Archived Docs
run: |
mike deploy --config-file mkdocs_archived.yml --push --branch gh-pages archived
- name: Set Default Version
run: |
mike set-default latest --push --branch gh-pages
- name: Create alias for Latest Docs
run: |
mike alias latest stable --push --branch gh-pages