Skip to content

Commit b9f3d73

Browse files
Hofer-Julianbilelmoussaoui
authored andcommitted
book: Split book workflow in two
That should give nicer reporting on GitHub's side
1 parent cb70f6b commit b9f3d73

File tree

3 files changed

+64
-62
lines changed

3 files changed

+64
-62
lines changed

.github/workflows/book-deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: book
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
paths:
8+
- "book/**"
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-22.04
13+
name: build
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions-rs/toolchain@v1
17+
with:
18+
profile: minimal
19+
toolchain: stable
20+
override: true
21+
22+
- name: Setup mdBook
23+
uses: peaceiris/actions-mdbook@v1
24+
25+
- run: mdbook build -d public
26+
working-directory: book
27+
28+
- name: Deploy to stable
29+
uses: peaceiris/actions-gh-pages@v3
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
publish_dir: ./book/public
33+
keep_files: false
34+
destination_dir: stable/latest/book

.github/workflows/book-lint.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: book
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "book/**"
7+
8+
jobs:
9+
check:
10+
runs-on: ubuntu-22.04
11+
name: build
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions-rs/toolchain@v1
15+
with:
16+
profile: minimal
17+
toolchain: stable
18+
override: true
19+
20+
- name: Setup mdBook
21+
uses: peaceiris/actions-mdbook@v1
22+
23+
- run: mdbook build -d public
24+
working-directory: book
25+
26+
- name: Link Checker
27+
uses: lycheeverse/[email protected]
28+
with:
29+
args: book/public
30+
fail: true

.github/workflows/book.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)