Skip to content

Commit 413f295

Browse files
authored
Add a way to modify the antsibull-docs repository used when installing antsibull-docs (#62)
* Add a way to modify the antsibull-docs repository. * Remove repeated default.
1 parent f3308b7 commit 413f295

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

.github/workflows/_shared-docs-build-pr.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ on:
4646
If not supplied, the latest version from PyPI is used. If supplied, must be a git ref from the antsibull-docs repository.
4747
required: false
4848
type: string
49+
init-antsibull-docs-repository:
50+
description: |
51+
When init-antsibull-docs-version is specified, this is the GitHub repository to which init-antsibull-docs-version refers.
52+
Has no effect if init-dest-dir is supplied, or if init-antsibull-docs-version is not supplied.
53+
required: false
54+
type: string
55+
default: ansible-community/antsibull-docs
4956
artifact-name:
5057
description: The name of the artifact to upload.
5158
required: false
@@ -245,6 +252,7 @@ jobs:
245252
dest-dir: ${{ steps.vars.outputs.init-dir-base }}
246253
skip-init: ${{ steps.vars.outputs.skip-init }}
247254
antsibull-docs-version: '${{ inputs.init-antsibull-docs-version }}'
255+
antsibull-docs-repository: '${{ inputs.init-antsibull-docs-repository }}'
248256
lenient: true
249257
fail-on-error: false
250258
provide-link-targets: ${{ inputs.provide-link-targets }}
@@ -280,6 +288,7 @@ jobs:
280288
dest-dir: ${{ steps.vars.outputs.init-dir-head }}
281289
skip-init: ${{ steps.vars.outputs.skip-init }}
282290
antsibull-docs-version: '${{ inputs.init-antsibull-docs-version }}'
291+
antsibull-docs-repository: '${{ inputs.init-antsibull-docs-repository }}'
283292
lenient: ${{ inputs.init-lenient }}
284293
fail-on-error: ${{ inputs.init-fail-on-error }}
285294
provide-link-targets: ${{ inputs.provide-link-targets }}

.github/workflows/_shared-docs-build-push.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ on:
4848
If not supplied, the latest version from PyPI is used. If supplied, must be a git ref from the antsibull-docs repository.
4949
required: false
5050
type: string
51+
init-antsibull-docs-repository:
52+
description: |
53+
When init-antsibull-docs-version is specified, this is the GitHub repository to which init-antsibull-docs-version refers.
54+
Has no effect if init-dest-dir is supplied, or if init-antsibull-docs-version is not supplied.
55+
required: false
56+
type: string
57+
default: ansible-community/antsibull-docs
5158
artifact-upload:
5259
description: Whether or not to upload the build as an artifact.
5360
type: boolean
@@ -163,6 +170,7 @@ jobs:
163170
dest-dir: ${{ steps.vars.outputs.init-dir }}
164171
skip-init: ${{ steps.vars.outputs.skip-init }}
165172
antsibull-docs-version: '${{ inputs.init-antsibull-docs-version }}'
173+
antsibull-docs-repository: '${{ inputs.init-antsibull-docs-repository }}'
166174
lenient: ${{ inputs.init-lenient }}
167175
fail-on-error: ${{ inputs.init-fail-on-error }}
168176
provide-link-targets: ${{ inputs.provide-link-targets }}

actions/ansible-docs-build-init/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ inputs:
3636
The version of antsibull-docs to install. When set, it refers to a git ref from which to install.
3737
If not set, the latest version from PyPI is installed.
3838
required: false
39+
antsibull-docs-repository:
40+
description: |
41+
When antsibull-docs-version is specified, this is the GitHub repository to which antsibull-docs-version refers.
42+
Has no effect if antsibull-docs-version is not supplied.
43+
default: ansible-community/antsibull-docs
44+
required: false
3945
provide-link-targets:
4046
description: A newline separated list of link targets that should not cause reference errors. A small RST file will be created during the build which contains these labels.
4147
required: false
@@ -74,7 +80,7 @@ runs:
7480
run: |
7581
echo "::group::Installing antsibull-docs"
7682
if [[ "${{ inputs.antsibull-docs-version }}" != "" ]] ; then
77-
pip install https://github.com/ansible-community/antsibull-docs/archive/${{ inputs.antsibull-docs-version }}.tar.gz
83+
pip install https://github.com/${{ inputs.antsibull-docs-repository }}/archive/${{ inputs.antsibull-docs-version }}.tar.gz
7884
else
7985
pip install antsibull-docs
8086
fi

0 commit comments

Comments
 (0)