Skip to content

Commit 186d3ed

Browse files
committed
rm duplicate step
1 parent d003145 commit 186d3ed

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

.github/workflows/build-package-docs.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ jobs:
5353
repository-name: ${{ github.event.inputs.repository-name || 'ansible-documentation' }}
5454
repository-branch: ${{ github.event.inputs.repository-branch || 'devel' }}
5555
ansible-package-version: ${{ github.event.inputs.ansible-package-version || 'devel' }}
56-
generate-redirects: ${{ github.event.inputs.generate-redirects || 'false' }}
56+
generate-redirects: >-
57+
${{ github.event_name == 'workflow_dispatch'
58+
&& github.event.inputs.generate-redirects == 'true' }}
5759
secrets:
5860
DOCS_BOT_TOKEN: ${{ secrets.DOCS_BOT_TOKEN }}
5961

.github/workflows/reusable-build-docs.yaml

+1-12
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ env:
3838
jobs:
3939
build-package-docs:
4040
runs-on: ubuntu-latest
41-
env:
42-
REDIRECTS: ${{ github.event.inputs.generate-redirects }}
4341
steps:
4442
- name: Checkout Ansible documentation
4543
uses: actions/checkout@v4
@@ -74,18 +72,9 @@ jobs:
7472
run: echo VERSION="${PACKAGE_VERSION}" >> "${GITHUB_ENV}"
7573

7674
- name: Build the Ansible community package docs
77-
if: env.REDIRECTS == 'true'
78-
run: >-
79-
make webdocs EXTRA_TAGS="-t redirects" ANSIBLE_VERSION="${{
80-
env.PACKAGE_VERSION != 'devel' && env.PACKAGE_VERSION || ''
81-
}}"
82-
working-directory: build-directory/docs/docsite
83-
84-
- name: Build the Ansible community package docs
85-
if: env.REDIRECTS == 'false'
8675
run: >-
8776
make webdocs ${{
88-
fromJSON(env.REDIRECTS) && '-t redirects' || ''
77+
inputs.generate-redirects && 'EXTRA_TAGS="-t redirects"' || ''
8978
}} ANSIBLE_VERSION="${{
9079
env.PACKAGE_VERSION != 'devel' && env.PACKAGE_VERSION || ''
9180
}}"

0 commit comments

Comments
 (0)