Skip to content

Commit c18f3b7

Browse files
ci: support books without mdbook-trunk
1 parent 373c25f commit c18f3b7

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/book.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: Book
22

33
on:
44
workflow_call:
5+
inputs:
6+
combine:
7+
description: Combine book outputs.
8+
type: boolean
9+
required: false
10+
default: true
511

612
permissions:
713
contents: read
@@ -60,9 +66,15 @@ jobs:
6066
working-directory: book
6167

6268
- name: Combine Book Outputs
69+
if: ${{ inputs.combine == 'true' }}
6370
run: mdbook-trunk combine
6471
working-directory: book
6572

73+
- name: Copy Book Output
74+
if: ${{ inputs.combine == 'false' }})
75+
run: rm -rf dist && cp -r book dist
76+
working-directory: book
77+
6678
- name: Upload artifact
6779
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
6880
with:

0 commit comments

Comments
 (0)