Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci-push
name: ci
on:
push:
branches-ignore:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: build book
run: |
cd guide
cmake -P build.cmake
cmake -P build.cmake || exit 1
ls book
- name: setup pages
uses: actions/configure-pages@v4
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/guide.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: ci-guide
on:
push:
branches-ignore:
- staging
jobs:
build-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: init
run: |
url="https://github.com/rust-lang/mdBook/releases/download/v0.4.47/mdbook-v0.4.47-x86_64-unknown-linux-gnu.tar.gz"
mkdir mdbook
curl -sSL $url | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: build
run: |
cd guide
cmake -P build.cmake || exit 1
ls book
5 changes: 3 additions & 2 deletions guide/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function(BuildBook LANGUAGE SOURCE_DIR TARGET_DIR)
message(WARNING "Skipping '${LANGUAGE}' – SUMMARY.md not found at ${SOURCE_DIR}")
return()
endif()

if(NOT EXISTS "${SOURCE_DIR}/book.toml")
message(WARNING "Skipping '${LANGUAGE}' – book.toml not found at ${SOURCE_DIR}")
return()
Expand All @@ -16,10 +16,11 @@ function(BuildBook LANGUAGE SOURCE_DIR TARGET_DIR)
execute_process(
COMMAND mdbook build -d ${TARGET_DIR}
WORKING_DIRECTORY ${SOURCE_DIR}
COMMAND_ERROR_IS_FATAL ANY
)
endfunction()

# Copy the theme folder
# Copy the theme folder
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/theme" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/translations")

BuildBook("en" "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/book")
Expand Down