~sircmpwn/wayland-book

bec46606567adb6fd11ddf7e01878ac8155d9cf1 — Drew DeVault 10 months ago 78a5e98 master
Update .build.yml to publish via sourcehut pages
2 files changed, 10 insertions(+), 32 deletions(-)

M .build.yml
M book.toml
M .build.yml => .build.yml +10 -27
@@ 1,38 1,21 @@
image: alpine/edge
packages:
- cargo
- cmake
- expat-dev
- fontconfig-dev
- freetype-dev
- harfbuzz-dev
- openssl-dev
- rsync
- calibre
- hut
- mdbook
- rust
secrets:
  - 160a72cf-34d6-47b7-928b-c13b42b4d4f6
oauth: pages.sr.ht/PAGES:RW
sources:
- https://git.sr.ht/~sircmpwn/wayland-book
- https://github.com/rust-lang-nursery/mdBook
- https://github.com/lbeckman314/mdbook-latex
artifacts:
- wayland-book/book/The-Wayland-Book.epub
tasks:
- setup: |
    echo "export PATH=$PATH:$HOME/.cargo/bin" >>.buildenv
- mdbook: |
    cd mdBook
    cargo install --path .
# TODO: Generate PDFs for distribution
#- mdbook-latex: |
#    cd mdbook-latex
#    cargo install --path .
- build: |
    cd wayland-book
    mdbook build
# TODO: package calibre for Alpine Linux
#- epub: |
#    cd wayland-book
#    ebook-convert book/html/print.html book/'The Wayland Book'.epub
- epub: |
    cd wayland-book
    ebook-convert book/print.html book/The-Wayland-Book.epub
- deploy: |
    cd wayland-book
    sshopts="-o StrictHostKeyChecking=no"
    rsync --rsh="ssh $sshopts" -rP book/ deploy@drewdevault.com:/var/www/wayland-book/
    hut pages publish -d wayland-book.com ./book

M book.toml => book.toml +0 -5
@@ 3,8 3,3 @@ authors = ["Drew DeVault"]
multilingual = false
src = "src"
title = "The Wayland Protocol"

[output.html]

#[output.latex]
#pdf = true