Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
35 changes: 14 additions & 21 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
name: Book CI

on:
push:
paths:
- "book/"
- "book/**"
- "training/"
- "training/**"
- ".github/workflows/book.yml"
- "**book**"
pull_request:
paths:
- "book/"
- "book/**"
- "training/"
- "training/**"
- ".github/workflows/book.yml"
- "**book**"
workflow_dispatch:
paths:
- "book/"
- "book/**"
- "training/"
- "training/**"
- ".github/workflows/book.yml"
- "**book**"

env:
MDBOOK_VERSION: "0.4.28"
MDBOOK_VERSION: "0.5.1"

jobs:
build:
Expand All @@ -32,23 +33,15 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v5

- name: Install Python dependencies
run: |
pip3 install --user python-dateutil linkchecker
- name: Put pip binary directory into path
run: echo "~/.local/bin" >> $GITHUB_PATH

- name: Download mdBook ${{ env.MDBOOK_VERSION }}
run: |
mkdir -p /tmp/mdbook
curl -Lo- https://github.com/rust-lang/mdBook/releases/download/v${{ env.MDBOOK_VERSION }}/mdbook-v${{ env.MDBOOK_VERSION }}-x86_64-unknown-linux-gnu.tar.gz | tar -C /tmp/mdbook -xzv
- uses: jontze/action-mdbook@v3
with:
token: ${{secrets.GITHUB_TOKEN}}
use-linkcheck: true
use-mermaid: true

- name: Build the contents of the book
run: "/tmp/mdbook/mdbook build book/ -d ../output/"
run: mdbook build -d ../output/

- name: Check links
run: linkchecker book

- name: Deploy
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
uses: appleboy/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ ota/
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

book/book
# Generated book files
book/
Loading