docs #234
Workflow file for this run
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, or dry-run" | |
type: choice | |
options: | |
- dev | |
- main | |
- dryrun | |
required: true | |
default: dryrun | |
schedule: | |
- cron: "0 14 * * SUN" | |
jobs: | |
pixi_lock: | |
name: Pixi lock | |
runs-on: ubuntu-latest | |
steps: | |
- uses: holoviz-dev/holoviz_tasks/pixi_lock@pixi | |
build_docs: | |
name: Documentation | |
needs: [pixi_lock] | |
runs-on: "ubuntu-latest" | |
timeout-minutes: 120 | |
defaults: | |
run: | |
shell: bash -el {0} | |
env: | |
DESC: "Documentation build" | |
MPLBACKEND: "Agg" | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
MOZ_HEADLESS: 1 | |
PANEL_EMBED: "true" | |
PANEL_EMBED_JSON: "true" | |
PANEL_EMBED_JSON_PREFIX: "json" | |
steps: | |
- uses: holoviz-dev/holoviz_tasks/pixi_install@pixi | |
with: | |
environments: docs | |
- name: Set output | |
id: vars | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: Build documentation | |
run: pixi run -e docs docs-build | |
- name: upload dev | |
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'))) | |
run: | | |
pipx install awscli | |
aws s3 sync --quiet ./builtdocs s3://dev.holoviews.org/ | |
- name: upload 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'))) | |
run: | | |
pipx install awscli | |
aws s3 sync --quiet ./builtdocs s3://holoviews.org/ |