Skip to content

Commit e3eb9d6

Browse files
committed
fix(ci): copy README.md to docs/ for honkit build
HonKit requires a README file in the working directory. This fix copies the necessary files from root to docs/ before building: - README.md (main entry point) - SUMMARY.md (table of contents) - CONTRIBUTING.md, CONTRIBUTING.zh.md - CHANGELOG.md
1 parent a8fb180 commit e3eb9d6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/pages.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@ jobs:
5959
working-directory: docs
6060
run: npm ci
6161

62+
- name: Prepare docs for honkit
63+
run: |
64+
# Copy README.md to docs/ for honkit (it expects README in the working directory)
65+
cp README.md docs/README.md
66+
# Copy SUMMARY.md to docs/ for honkit
67+
cp SUMMARY.md docs/SUMMARY.md
68+
# Copy other root-level docs that SUMMARY.md references
69+
cp CONTRIBUTING.md docs/CONTRIBUTING.md || true
70+
cp CONTRIBUTING.zh.md docs/CONTRIBUTING.zh.md || true
71+
cp CHANGELOG.md docs/CHANGELOG.md || true
72+
6273
- name: Build docs
6374
working-directory: docs
6475
run: npx honkit build . ../_site

0 commit comments

Comments
 (0)