diff --git a/action.yml b/action.yml index c377a7e..9d6d801 100644 --- a/action.yml +++ b/action.yml @@ -13,6 +13,9 @@ inputs: description: Source file path. DESTINATION: description: Destination path, relative to repository root. + ARTIFACT_NAME: + description: Name for build artifact. Required when building multiple documents in same job. + default: "spec-prod-result" BUILD_FAIL_ON: description: Exit behaviour on errors. default: fatal @@ -123,7 +126,7 @@ runs: path: |- ${{ steps.build.outputs.gh && fromJson(steps.build.outputs.gh).dest }} ${{ steps.build.outputs.w3c && fromJson(steps.build.outputs.w3c).dest }} - name: spec-prod-result + name: ${{ inputs.ARTIFACT_NAME }} retention-days: 5 - name: Validate hyperlinks diff --git a/docs/examples.md b/docs/examples.md index 98f4cb0..a8e8845 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -184,19 +184,23 @@ jobs: max-parallel: 1 matrix: include: - - source: spec.html + - name: spec-0 + source: spec.html destination: index.html echidna_token: ECHIDNA_TOKEN_SPEC - - source: spec-1 + - name: spec-1 + source: spec-1 destination: the-spec echidna_token: ECHIDNA_TOKEN_SPEC1 - - source: spec-2 + - name: spec-2 + source: spec-2 # destination defaults to spec-2/index.html # echidna_token defaults to no publication to w3.org/TR steps: - uses: actions/checkout@v4 - uses: w3c/spec-prod@v2 with: + ARTIFACT_NAME: ${{ matrix.name }} # required when building multiple documents in same job SOURCE: ${{ matrix.source }} DESTINATION: ${{ matrix.destination }} GH_PAGES_BRANCH: gh-pages diff --git a/docs/options.md b/docs/options.md index 9459196..8b59e4a 100644 --- a/docs/options.md +++ b/docs/options.md @@ -32,6 +32,14 @@ Location of generated HTML document and other assets. This is useful when you've | `my-spec-src` | `my-spec-out` | `./my-spec-out/index.html` | `./my-spec-out/` | | `index.html` | `index.html` | `./index.html` | `./` | +## `ARTIFACT_NAME` + +Name for artifact which will be uploaded to workflow run. Required when building multiple documents in same job. + +**Possible values:** Any valid artifact name. + +**Default:** `"spec-prod-result"`. + ## `BUILD_FAIL_ON` Define exit behaviour on build errors or warnings.