-
Notifications
You must be signed in to change notification settings - Fork 15
70 lines (65 loc) · 1.93 KB
/
build-main-docs.yml
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
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 }}