Skip to content

Commit

Permalink
Bump codspeed action (#81)
Browse files Browse the repository at this point in the history
[skip ci]

[skip ci]
  • Loading branch information
hoxbro committed Dec 7, 2023
1 parent 8d8132d commit 482c9e1
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
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 13 * * SUN'

env:
PYTHON_VERSION: 3.9

jobs:
build_docs:
name: Documentation
runs-on: 'ubuntu-latest'
timeout-minutes: 120
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Install hatch
run: pipx install hatch
- name: build docs
run: hatch -v run docs:build
- 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/holonote
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: holonote.holoviz.org
# force_orphan: true

0 comments on commit 482c9e1

Please sign in to comment.