name: Continuous Delivery

on:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Install Nix
        uses: cachix/install-nix-action@630ae543ea3a38a9a4166f03376c02c50f408342 # v31.11.0
      - name: Build book (PDF + EPUB)
        run: nix build .#book -L
      - name: Archive PDF
        uses: actions/upload-artifact@v4
        with:
          name: pdf
          path: result/book.pdf
      - name: Archive EPUB
        uses: actions/upload-artifact@v4
        with:
          name: epub
          path: result/book.epub
