docs #163
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 18 * * SUN' | |
jobs: | |
build_docs: | |
name: Documentation | |
runs-on: 'ubuntu-latest' | |
timeout-minutes: 120 | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
DESC: "Documentation build" | |
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" | |
MPLBACKEND: "Agg" | |
MOZ_HEADLESS: 1 | |
DISPLAY: ":99.0" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: "100" | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
- name: Fetch unshallow | |
run: git fetch --prune --tags --unshallow -f | |
- name: Set output | |
id: vars | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: conda setup | |
run: | | |
conda create -n test-environment | |
conda activate test-environment | |
conda config --env --append channels pyviz/label/dev --append channels bokeh --append channels conda-forge | |
conda config --env --remove channels defaults | |
conda config --env --set channel_priority strict | |
conda config --env --show-sources | |
conda install python=3.9 pyctdev | |
- name: doit develop_install | |
run: | | |
conda activate test-environment | |
doit develop_install -o doc -o examples_extra | |
- name: doit env_capture | |
run: | | |
conda activate test-environment | |
doit env_capture | |
- name: download data | |
run: | | |
conda activate test-environment | |
bash scripts/download_data.sh | |
- name: generate rst | |
run: | | |
conda activate test-environment | |
nbsite generate-rst --org holoviz --project-name geoviews | |
- name: build docs | |
run: | | |
conda activate test-environment | |
nbsite build --what=html --output=builtdocs --org holoviz --project-name geoviews | |
- 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/geoviews | |
publish_dir: ./builtdocs | |
force_orphan: true | |
- 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: geoviews.org | |
force_orphan: true |