Skip to content

Build Docs

Build Docs #2

name: Build Docs
on:
workflow_dispatch:
inputs:
package:
description: 'Name of the package to build docs for.'
required: true
type: choice
options:
- 'plotly-express'
- 'ui'
version:
description: 'Version of the package to build docs for. This only affects where the docs are synced and not the actual docs built so in most cases this should be "main".'
required: true
type: string
default: 'main'
event_name:
description: 'Event name to determine if the docs should be synced. Keep this as "push" to sync the docs.'
required: true
type: choice
default: 'push'
options:
- 'push'
- 'test'
workflow_call:
inputs:
package:
description: The plugin to publish the docs for
required: true
type: string
version:
description: The version of the plugin to publish the docs for
type: string
default: 'main'
event_name:
description: The event name that triggered the workflow
required: true
type: string
jobs:
check-make-docs:
runs-on: ubuntu-22.04
outputs:
files_exists: ${{ steps.check_files.outputs.files_exists }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v3
with:
files: 'plugins/${{ inputs.package }}/make_docs.py'
build-plugin:
if: needs.check-make-docs.outputs.files_exists == 'true'
needs: check-make-docs
uses: ./.github/workflows/build-python-package.yml
with:
package: ${{ inputs.package }}
main-docs:
needs: build-plugin
uses: ./.github/workflows/make-docs.yml
secrets: inherit
with:
package: ${{ inputs.package }}
version: ${{ inputs.version }}
event_name: ${{ inputs.event_name }}