diff --git a/.github/workflows/docs-generate-html.yml b/.github/workflows/docs-generate-html.yml index bf511a0..413c663 100644 --- a/.github/workflows/docs-generate-html.yml +++ b/.github/workflows/docs-generate-html.yml @@ -1,5 +1,5 @@ name: "Generate HTML" -run-name: "Generate ${{ inputs.publish-env }} HTML from ${{ github.ref_name }}" +run-name: "Generate HTML from ${{ github.ref_name }} for ${{ inputs.publish-env }}" permissions: contents: read diff --git a/.github/workflows/docs-generate-pdf.yml b/.github/workflows/docs-generate-pdf.yml index e32359e..437bfec 100644 --- a/.github/workflows/docs-generate-pdf.yml +++ b/.github/workflows/docs-generate-pdf.yml @@ -1,5 +1,5 @@ name: "Generate PDF" -run-name: "Generate ${{ inputs.publish-env }} PDF from ${{ github.ref_name }}" +run-name: "Generate PDF from ${{ inputs.build-ref || github.ref_name }} for ${{ inputs.publish-env }}" permissions: contents: read @@ -11,8 +11,9 @@ permissions: # way: there's no docs-verify step (no equivalent check exists yet for a PDF), and # build/publish are two plain jobs rather than a reusable-workflow call plus a verify call. # -# No build-ref input - see docs-generate-html.yml's own comment on why: the git ref to -# build from is always whatever ref this run was itself dispatched against. +# The optional build-ref input is the branch to build, for the PDF of a version branch: the +# trigger dispatches this from the dev or prod branch (the branch docs-publish checks) with the +# version branch in build-ref. Blank builds the branch this run is on. # # Do not run this by hand. It has a workflow_dispatch trigger only because the API call that # starts it needs one, and it must run as its own run so that its head_branch is the branch @@ -30,6 +31,11 @@ on: options: - dev - prod + build-ref: + description: "The branch to build. Leave blank to build the branch this workflow runs on." + type: string + required: false + default: '' jobs: @@ -37,7 +43,7 @@ jobs: name: Generate PDF uses: neo4j/docs-tools/.github/workflows/reusable-docs-pdf-build.yml@v2 with: - build-ref: ${{ github.ref_name }} + build-ref: ${{ inputs.build-ref || github.ref_name }} fetch-depth: 0 publish-env: ${{ inputs.publish-env }}