Files
letterpress/.github/workflows/continuous_integration.yaml
Dunya Kirkali 0f64b1133e Add Nix flake for reproducible dev and CI/CD
- flake.nix pins the full toolchain (asciidoctor + pdf/epub3/diagram/
  mathematical, plantuml, graphviz, jre, vale, epubcheck) via bundlerEnv
- Gemfile/Gemfile.lock/gemset.nix lock the Ruby gems; work around the
  vendored mtex2MML cmake_minimum_required incompatibility
- 'nix build' produces book.pdf + book.epub; 'nix develop' gives a shell
  where all existing make targets work
- CI/CD workflows now install Nix and build/lint/validate through the flake
- devcontainer uses Nix; add .envrc for direnv; document in README

Co-authored-by: Shelley <shelley@exe.dev>
2026-08-08 22:27:23 +02:00

39 lines
1.0 KiB
YAML

name: Continuous Integration
on:
push:
branches:
- main
pull_request:
jobs:
words:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@630ae543ea3a38a9a4166f03376c02c50f408342 # v31.11.0
- name: Count words
run: nix develop --command make count
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@630ae543ea3a38a9a4166f03376c02c50f408342 # v31.11.0
- name: Vale
run: nix develop --command make lint
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: Validate EPUB
run: nix develop --command epubcheck result/book.epub