Skip to content

Commit

Permalink
ci(preview-action): add ignore-errors input (#466)
Browse files Browse the repository at this point in the history
The new input allows to build and deploy the PR preview but also to
validate xref.
Currently, this is needed for documentation component that have no xref
to other components. See
bonitasoft/bonita-labs-doc#139
In the future, when `Antora Atlas` will be used (#326), all
documentation content repositories will progressively do xref validation
as part of the preview build.
  • Loading branch information
tbouffard authored Nov 18, 2022
1 parent 2eb0595 commit 5de6640
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/actions/build-and-publish-pr-preview/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ inputs:
description: 'The name of the component to build. If set, the build-preview-command input is ignored'
required: false
default: ''
ignore-errors:
description: 'Only applies when the `component-name` input is set. If `true`, ignores Antora error.'
required: false
default: 'true'

runs:
using: "composite"
Expand All @@ -40,7 +44,7 @@ runs:
- name: Build Site without error check
if: github.event.action != 'closed' && inputs.component-name != ''
shell: bash
run: ./build-preview.bash --component ${{inputs.component-name}} --branch ${{ github.head_ref }} --ignore-error true --fetch-sources true --pr "${{ github.event.pull_request.number }}" --site-url "${{ steps.surge-preview-tools.outputs.preview-url }}"
run: ./build-preview.bash --component ${{inputs.component-name}} --branch ${{ github.head_ref }} --ignore-error ${{inputs.ignore-errors}} --fetch-sources true --pr "${{ github.event.pull_request.number }}" --site-url "${{ steps.surge-preview-tools.outputs.preview-url }}"
- name: Build Site
if: github.event.action != 'closed' && inputs.component-name == ''
shell: bash
Expand Down

0 comments on commit 5de6640

Please sign in to comment.