Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't break with multiple specs, add ARTIFACT_NAME option #180

Merged
merged 3 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
sidvishnoi marked this conversation as resolved.
Show resolved Hide resolved
retention-days: 5

- name: Validate hyperlinks
Expand Down
10 changes: 7 additions & 3 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down