-
-
Notifications
You must be signed in to change notification settings - Fork 109
120 lines (118 loc) · 3.63 KB
/
docs.yaml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: docs
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
workflow_dispatch:
inputs:
target:
description: 'Site to build and deploy'
type: choice
options:
- dev
- main
- dryrun
required: true
default: dryrun
schedule:
- cron: '0 15 * * SUN'
env:
PYTHON_VERSION: "3.11"
jobs:
conda_build_docs:
name: Documentation:conda
runs-on: 'ubuntu-latest'
timeout-minutes: 120
defaults:
run:
shell: bash -l {0}
env:
DESC: "Documentation build"
MPLBACKEND: "Agg"
MOZ_HEADLESS: 1
DISPLAY: ":99.0"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
environment-file: envs/py${{ env.PYTHON_VERSION }}-docs.yaml
activate-environment: hvplotdocs
- name: Set and echo git ref
id: vars
run: |
echo "Deploying from ref ${GITHUB_REF#refs/*/}"
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: install dev nbsite
run: pip install --pre -U nbsite
- name: conda info
run: conda info
- name: conda list
run: conda list
- name: build docs
run: sphinx-build -b html doc builtdocs
- name: report failure
if: failure()
run: cat /tmp/sphinx-*.log | tail -n 100
- name: Deploy dev
uses: peaceiris/actions-gh-pages@v3
if: |
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'dev') ||
(github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
with:
personal_token: ${{ secrets.ACCESS_TOKEN }}
external_repository: holoviz-dev/hvplot
publish_dir: ./builtdocs
force_orphan: true
exclude_assets: '.doctrees'
- name: Deploy main
if: |
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'main') ||
(github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./builtdocs
cname: hvplot.holoviz.org
force_orphan: true
exclude_assets: '.doctrees'
pip_build_docs:
name: Documentation:pip
runs-on: 'ubuntu-latest'
timeout-minutes: 120
defaults:
run:
shell: bash -l {0}
env:
DESC: "Documentation build"
MPLBACKEND: "Agg"
MOZ_HEADLESS: 1
DISPLAY: ":99.0"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: install
run: pip install -v --prefer-binary -e ."[doc, examples, geo]"
- name: install dev nbsite
run: pip install --pre -U nbsite
- name: pip list
run: pip list
- name: Set and echo git ref
id: vars
run: |
echo "Deploying from ref ${GITHUB_REF#refs/*/}"
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: build docs
run: sphinx-build -b html doc builtdocs
- name: report failure
if: failure()
run: cat /tmp/sphinx-*.log | tail -n 100