mirror of
https://github.com/dunyakirkali/letterpress.git
synced 2026-08-25 04:51:44 +00:00
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>
This commit is contained in:
committed by
Dunya Kirkali
parent
c0c95fdff5
commit
0f64b1133e
@@ -23,6 +23,7 @@ Odum
|
||||
Peitgen
|
||||
Polina
|
||||
Rainforest
|
||||
rainforests
|
||||
Romanesco
|
||||
Saupe
|
||||
Slimbach
|
||||
|
||||
24
.github/workflows/continuous_delivery.yaml
vendored
24
.github/workflows/continuous_delivery.yaml
vendored
@@ -4,32 +4,22 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
pdf:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: asciidoctor/docker-asciidoctor
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Generate PDF
|
||||
run: make output/book.pdf
|
||||
- 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: output/book.pdf
|
||||
epub:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: asciidoctor/docker-asciidoctor
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Generate EPUB
|
||||
run: make output/book.epub
|
||||
path: result/book.pdf
|
||||
- name: Archive EPUB
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: epub
|
||||
path: output/book.epub
|
||||
|
||||
path: result/book.epub
|
||||
|
||||
24
.github/workflows/continuous_integration.yaml
vendored
24
.github/workflows/continuous_integration.yaml
vendored
@@ -12,17 +12,27 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@630ae543ea3a38a9a4166f03376c02c50f408342 # v31.11.0
|
||||
- name: Count words
|
||||
run: make count
|
||||
run: nix develop --command make count
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install Asciidoctor
|
||||
run: sudo apt-get install -y asciidoctor
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@630ae543ea3a38a9a4166f03376c02c50f408342 # v31.11.0
|
||||
- name: Vale
|
||||
uses: errata-ai/vale-action@reviewdog
|
||||
with:
|
||||
files: source/
|
||||
fail_on_error: true
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user