2024-08-07 01:04:11 +00:00
|
|
|
# This action attempts to build the Monero book, if changed.
|
|
|
|
|
|
|
|
name: Monero mdBook
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-08-09 19:44:53 +00:00
|
|
|
branches: ['main']
|
|
|
|
paths: ['books/protocol/**']
|
|
|
|
pull_request:
|
|
|
|
paths: ['books/protocol/**']
|
|
|
|
workflow_dispatch:
|
2024-08-07 01:04:11 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
# Version of `mdbook` to install.
|
|
|
|
MDBOOK_VERSION: 0.4.36
|
|
|
|
# Version of `mdbook-svgbob` to install.
|
|
|
|
# <https://github.com/boozook/mdbook-svgbob>.
|
|
|
|
MDBOOK_SVGBOB_VERSION: 0.2.1
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/bin/mdbook
|
|
|
|
~/.cargo/bin/mdbook-svgbob
|
|
|
|
key: monero-book
|
|
|
|
|
|
|
|
- name: Install mdBook
|
|
|
|
run: |
|
2024-08-09 19:44:53 +00:00
|
|
|
cargo install --locked --version ${MDBOOK_VERSION} mdbook || echo "mdbook already exists"
|
|
|
|
cargo install --locked --version ${MDBOOK_SVGBOB_VERSION} mdbook-svgbob || echo "mdbook-svgbob already exists"
|
2024-08-07 01:04:11 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: mdbook build books/protocol
|