File tree Expand file tree Collapse file tree 4 files changed +28
-4
lines changed Expand file tree Collapse file tree 4 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 1
- name : ci-push
1
+ name : ci
2
2
on :
3
3
push :
4
4
branches-ignore :
Original file line number Diff line number Diff line change 24
24
- name : build book
25
25
run : |
26
26
cd guide
27
- cmake -P build.cmake
27
+ cmake -P build.cmake || exit 1
28
28
ls book
29
29
- name : setup pages
30
30
uses : actions/configure-pages@v4
Original file line number Diff line number Diff line change
1
+ name : ci-guide
2
+ on :
3
+ push :
4
+ branches-ignore :
5
+ - staging
6
+ jobs :
7
+ build-book :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - uses : actions/checkout@v4
11
+ with :
12
+ fetch-depth : 0
13
+ - name : init
14
+ run : |
15
+ url="https://github.com/rust-lang/mdBook/releases/download/v0.4.47/mdbook-v0.4.47-x86_64-unknown-linux-gnu.tar.gz"
16
+ mkdir mdbook
17
+ curl -sSL $url | tar -xz --directory=./mdbook
18
+ echo `pwd`/mdbook >> $GITHUB_PATH
19
+ - name : build
20
+ run : |
21
+ cd guide
22
+ cmake -P build.cmake || exit 1
23
+ ls book
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ function(BuildBook LANGUAGE SOURCE_DIR TARGET_DIR)
6
6
message (WARNING "Skipping '${LANGUAGE} ' – SUMMARY.md not found at ${SOURCE_DIR} " )
7
7
return ()
8
8
endif ()
9
-
9
+
10
10
if (NOT EXISTS "${SOURCE_DIR} /book.toml" )
11
11
message (WARNING "Skipping '${LANGUAGE} ' – book.toml not found at ${SOURCE_DIR} " )
12
12
return ()
@@ -16,10 +16,11 @@ function(BuildBook LANGUAGE SOURCE_DIR TARGET_DIR)
16
16
execute_process (
17
17
COMMAND mdbook build -d ${TARGET_DIR}
18
18
WORKING_DIRECTORY ${SOURCE_DIR}
19
+ COMMAND_ERROR_IS_FATAL ANY
19
20
)
20
21
endfunction ()
21
22
22
- # Copy the theme folder
23
+ # Copy the theme folder
23
24
file (COPY "${CMAKE_CURRENT_SOURCE_DIR} /theme" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR} /translations" )
24
25
25
26
BuildBook ("en" "${CMAKE_CURRENT_SOURCE_DIR} " "${CMAKE_CURRENT_SOURCE_DIR} /book" )
You can’t perform that action at this time.
0 commit comments