Skip to content

Commit

Permalink
book: Split book workflow in two
Browse files Browse the repository at this point in the history
That should give nicer reporting on GitHub's side
  • Loading branch information
Hofer-Julian authored and bilelmoussaoui committed Oct 20, 2023
1 parent cb70f6b commit b9f3d73
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 62 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/book-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: book

on:
push:
branches:
- "master"
paths:
- "book/**"

jobs:
deploy:
runs-on: ubuntu-22.04
name: build
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1

- run: mdbook build -d public
working-directory: book

- name: Deploy to stable
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/public
keep_files: false
destination_dir: stable/latest/book
30 changes: 30 additions & 0 deletions .github/workflows/book-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: book

on:
pull_request:
paths:
- "book/**"

jobs:
check:
runs-on: ubuntu-22.04
name: build
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1

- run: mdbook build -d public
working-directory: book

- name: Link Checker
uses: lycheeverse/[email protected]
with:
args: book/public
fail: true
62 changes: 0 additions & 62 deletions .github/workflows/book.yml

This file was deleted.

0 comments on commit b9f3d73

Please sign in to comment.