Skip to content

Commit f349c25

Browse files
authored
add CI (#5)
* add build.yml * update mdbook.yml
1 parent f85a175 commit f349c25

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: build
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch: ~
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
env:
11+
MDBOOK_VERSION: 0.4.47
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- run: rustup update stable && rustup default stable
17+
18+
- run: cargo install --version ${MDBOOK_VERSION} mdbook
19+
20+
- run: mdbook build

.github/workflows/mdbook.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: deploy book
22

33
on:
44
push:
5-
branches: main
5+
branches: [main]
66
workflow_dispatch: ~
77

88
permissions:
@@ -21,18 +21,16 @@ jobs:
2121
MDBOOK_VERSION: 0.4.47
2222
steps:
2323
- uses: actions/checkout@v4
24-
- name: Install mdBook
25-
run: |
26-
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
27-
rustup update
28-
cargo install --version ${MDBOOK_VERSION} mdbook
24+
25+
- run: rustup update stable && rustup default stable
26+
27+
- run: cargo install --version ${MDBOOK_VERSION} mdbook
2928

3029
- name: Setup Pages
3130
id: pages
3231
uses: actions/configure-pages@v4
3332

34-
- name: Build with mdBook
35-
run: mdbook build
33+
- run: mdbook build
3634

3735
- name: Upload artifact
3836
uses: actions/upload-pages-artifact@v3

0 commit comments

Comments
 (0)