Skip to content

Commit

Permalink
Add book building in Github Actions. Translate chapter 13. (#93)
Browse files Browse the repository at this point in the history
* translate ch13 and part of summary to russian

* Add github actions workflow file

* Translate appendixs
  • Loading branch information
AlexanderAverin authored Jul 8, 2022
1 parent 7020a42 commit 7648d12
Show file tree
Hide file tree
Showing 8 changed files with 443 additions and 385 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: build

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout source code
uses: actions/[email protected]

- name: Install Calibre
run: |
wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin
mkdir -p ~/.local/bin
ln -s /opt/calibre/calibre ~/.local/bin/calibre
ln -s /opt/calibre/ebook-convert ~/.local/bin/ebook-convert
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 10.22.1

- name: Setup gitbook
run: |
npm install
npm run setup
- name: Generate PDF
run: |
npm run generate-pdf
mv book.pdf mostly-adequate-guide-to-functional-programming.pdf
- name: Generate EPUB
run: |
npm run generate-epub
mv book.epub mostly-adequate-guide-to-functional-programming.epub
- uses: actions/upload-artifact@v2
with:
name: PDF
path: mostly-adequate-guide-to-functional-programming.pdf

- uses: actions/upload-artifact@v2
with:
name: EPUB
path: mostly-adequate-guide-to-functional-programming.epub

- run: echo "::set-output name=ID::$(git describe --tags --always)"
id: release-id

- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.release-id.outputs.ID }}
files: |
mostly-adequate-guide-to-functional-programming.pdf
mostly-adequate-guide-to-functional-programming.epub
148 changes: 148 additions & 0 deletions SUMMARY-en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Summary

* [Chapter 01: What Ever Are We Doing?](ch01.md)
* [Introductions](ch01.md#introductions)
* [A Brief Encounter](ch01.md#a-brief-encounter)
* [Chapter 02: First Class Functions](ch02.md)
* [A Quick Review](ch02.md#a-quick-review)
* [Why Favor First Class?](ch02.md#why-favor-first-class)
* [Chapter 03: Pure Happiness with Pure Functions](ch03.md)
* [Oh to Be Pure Again](ch03.md#oh-to-be-pure-again)
* [Side Effects May Include...](ch03.md#side-effects-may-include)
* [8th Grade Math](ch03.md#8th-grade-math)
* [The Case for Purity](ch03.md#the-case-for-purity)
* [In Summary](ch03.md#in-summary)
* [Chapter 04: Currying](ch04.md)
* [Can't Live If Livin' Is without You](ch04.md#cant-live-if-livin-is-without-you)
* [More Than a Pun / Special Sauce](ch04.md#more-than-a-pun--special-sauce)
* [In Summary](ch04.md#in-summary)
* [Exercises](ch04.md#exercises)
* [Chapter 05: Coding by Composing](ch05.md)
* [Functional Husbandry](ch05.md#functional-husbandry)
* [Pointfree](ch05.md#pointfree)
* [Debugging](ch05.md#debugging)
* [Category Theory](ch05.md#category-theory)
* [In Summary](ch05.md#in-summary)
* [Exercises](ch05.md#exercises)
* [Chapter 06: Example Application](ch06.md)
* [Declarative Coding](ch06.md#declarative-coding)
* [A Flickr of Functional Programming](ch06.md#a-flickr-of-functional-programming)
* [A Principled Refactor](ch06.md#a-principled-refactor)
* [In Summary](ch06.md#in-summary)
* [Chapter 07: Hindley-Milner and Me](ch07.md)
* [What's Your Type?](ch07.md#whats-your-type)
* [Tales from the Cryptic](ch07.md#tales-from-the-cryptic)
* [Narrowing the Possibility](ch07.md#narrowing-the-possibility)
* [Free as in Theorem](ch07.md#free-as-in-theorem)
* [Constraints](ch07.md#constraints)
* [In Summary](ch07.md#in-summary)
* [Chapter 08: Tupperware](ch08.md)
* [The Mighty Container](ch08.md#the-mighty-container)
* [My First Functor](ch08.md#my-first-functor)
* [Schrödinger's Maybe](ch08.md#schrödingers-maybe)
* [Use Cases](ch08.md#use-cases)
* [Releasing the Value](ch08.md#releasing-the-value)
* [Pure Error Handling](ch08.md#pure-error-handling)
* [Old McDonald Had Effects...](ch08.md#old-mcdonald-had-effects)
* [Asynchronous Tasks](ch08.md#asynchronous-tasks)
* [A Spot of Theory](ch08.md#a-spot-of-theory)
* [In Summary](ch08.md#in-summary)
* [Exercises](ch08.md#exercises)
* [Chapter 09: Monadic Onions](ch09.md)
* [Pointy Functor Factory](ch09.md#pointy-functor-factory)
* [Mixing Metaphors](ch09.md#mixing-metaphors)
* [My Chain Hits My Chest](ch09.md#my-chain-hits-my-chest)
* [Power Trip](ch09.md#power-trip)
* [Theory](ch09.md#theory)
* [In Summary](ch09.md#in-summary)
* [Exercises](ch09.md#exercises)
* [Chapter 10: Applicative Functors](ch10.md)
* [Applying Applicatives](ch10.md#applying-applicatives)
* [Ships in Bottles](ch10.md#ships-in-bottles)
* [Coordination Motivation](ch10.md#coordination-motivation)
* [Bro, Do You Even Lift?](ch10.md#bro-do-you-even-lift)
* [Operators](ch10.md#operators)
* [Free Can Openers](ch10.md#free-can-openers)
* [Laws](ch10.md#laws)
* [In Summary](ch10.md#in-summary)
* [Exercises](ch10.md#exercises)
* [Chapter 11: Transform Again, Naturally](ch11.md)
* [Curse This Nest](ch11.md#curse-this-nest)
* [A Situational Comedy](ch11.md#a-situational-comedy)
* [All Natural](ch11.md#all-natural)
* [Principled Type Conversions](ch11.md#principled-type-conversions)
* [Feature Envy](ch11.md#feature-envy)
* [Isomorphic JavaScript](ch11.md#isomorphic-javascript)
* [A Broader Definition](ch11.md#a-broader-definition)
* [One Nesting Solution](ch11.md#one-nesting-solution)
* [In Summary](ch11.md#in-summary)
* [Exercises](ch11.md#exercises)
* [Chapter 12: Traversing the Stone](ch12.md)
* [Types n' Types](ch12.md#types-n-types)
* [Type Feng Shui](ch12.md#type-feng-shui)
* [Effect Assortment](ch12.md#effect-assortment)
* [Waltz of the Types](ch12.md#waltz-of-the-types)
* [No Law and Order](ch12.md#no-law-and-order)
* [In Summary](ch12.md#in-summary)
* [Exercises](ch12.md#exercises)
* [Chapter 13: Monoids bring it all together](ch13.md)
* [Wild combination](ch13.md#wild-combination)
* [Abstracting addition](ch13.md#abstracting-addition)
* [All my favourite functors are semigroups](ch13.md#all-my-favourite-functors-are-semigroups)
* [Monoids for nothing](ch13.md#monoids-for-nothing)
* [Folding down the house](ch13.md#folding-down-the-house)
* [Not quite a monoid](ch13.md#not-quite-a-monoid)
* [Grand unifying theory](ch13.md#grand-unifying-theory)
* [In Summary](ch13.md#in-summary)
* [Exercises](ch13.md#exercises)
* [Appendix A: Essential Functions Support](appendix_a.md)
* [always](appendix_a.md#always)
* [compose](appendix_a.md#compose)
* [curry](appendix_a.md#curry)
* [either](appendix_a.md#either)
* [identity](appendix_a.md#identity)
* [inspect](appendix_a.md#inspect)
* [left](appendix_a.md#left)
* [liftA\*](appendix_a.md#lifta)
* [maybe](appendix_a.md#maybe)
* [nothing](appendix_a.md#nothing)
* [reject](appendix_a.md#reject)
* [Appendix B: Algebraic Structures Support](appendix_b.md)
* [Compose](appendix_b.md#compose)
* [Either](appendix_b.md#either)
* [Identity](appendix_b.md#identity)
* [IO](appendix_b.md#io)
* [List](appendix_b.md#list)
* [Map](appendix_b.md#map)
* [Maybe](appendix_b.md#maybe)
* [Task](appendix_b.md#task)
* [Appendix C: Pointfree Utilities](appendix_c.md)
* [add](appendix_c.md#add)
* [append](appendix_c.md#append)
* [chain](appendix_c.md#chain)
* [concat](appendix_c.md#concat)
* [eq](appendix_c.md#eq)
* [filter](appendix_c.md#filter)
* [flip](appendix_c.md#flip)
* [forEach](appendix_c.md#foreach)
* [head](appendix_c.md#head)
* [intercalate](appendix_c.md#intercalate)
* [join](appendix_c.md#join)
* [last](appendix_c.md#last)
* [map](appendix_c.md#map)
* [match](appendix_c.md#match)
* [prop](appendix_c.md#prop)
* [reduce](appendix_c.md#reduce)
* [replace](appendix_c.md#replace)
* [safeHead](appendix_c.md#safehead)
* [safeLast](appendix_c.md#safelast)
* [safeProp](appendix_c.md#safeprop)
* [sequence](appendix_c.md#sequence)
* [sortBy](appendix_c.md#sortby)
* [split](appendix_c.md#split)
* [take](appendix_c.md#take)
* [toLowerCase](appendix_c.md#tolowercase)
* [toString](appendix_c.md#tostring)
* [toUpperCase](appendix_c.md#touppercase)
* [traverse](appendix_c.md#traverse)
* [unsafePerformIO](appendix_c.md#unsafeperformio)
146 changes: 0 additions & 146 deletions SUMMARY-ru.md

This file was deleted.

Loading

0 comments on commit 7648d12

Please sign in to comment.