Skip to content

Commit e5aa315

Browse files
authored
Merge pull request #645 from ferllop/master
Update build workflow to run properly
2 parents 8a23c7d + b0b9d82 commit e5aa315

File tree

4 files changed

+33
-11
lines changed

4 files changed

+33
-11
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@ on:
55
branches:
66
- master
77

8+
env:
9+
BOOK_FILENAME: mostly-adequate-guide-to-functional-programming
10+
811
jobs:
912
build:
10-
runs-on: ubuntu-18.04
13+
runs-on: ubuntu-22.04
1114
steps:
1215
- name: Checkout source code
1316
uses: actions/[email protected]
1417

1518
- name: Install Calibre
1619
run: |
20+
sudo apt install -y libopengl0 libegl1 libxcb-cursor0
1721
wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin
1822
mkdir -p ~/.local/bin
1923
ln -s /opt/calibre/calibre ~/.local/bin/calibre
@@ -24,6 +28,10 @@ jobs:
2428
with:
2529
node-version: 10.22.1
2630

31+
- name: Generate summary
32+
run: |
33+
npm run generate-summary
34+
2735
- name: Setup gitbook
2836
run: |
2937
npm install
@@ -32,29 +40,29 @@ jobs:
3240
- name: Generate PDF
3341
run: |
3442
npm run generate-pdf
35-
mv book.pdf mostly-adequate-guide-to-functional-programming.pdf
43+
mv book.pdf ${BOOK_FILENAME}.pdf
3644
3745
- name: Generate EPUB
3846
run: |
3947
npm run generate-epub
40-
mv book.epub mostly-adequate-guide-to-functional-programming.epub
48+
mv book.epub ${BOOK_FILENAME}.epub
4149
4250
- uses: actions/upload-artifact@v2
4351
with:
4452
name: PDF
45-
path: mostly-adequate-guide-to-functional-programming.pdf
53+
path: ${{ env.BOOK_FILENAME }}.pdf
4654

4755
- uses: actions/upload-artifact@v2
4856
with:
4957
name: EPUB
50-
path: mostly-adequate-guide-to-functional-programming.epub
58+
path: ${{ env.BOOK_FILENAME }}.epub
5159

52-
- run: echo "::set-output name=ID::$(git describe --tags --always)"
60+
- run: echo "ID=$(git describe --tags --always)" >> $GITHUB_OUTPUT
5361
id: release-id
5462

5563
- uses: softprops/action-gh-release@v1
5664
with:
5765
tag_name: ${{ steps.release-id.outputs.ID }}
5866
files: |
59-
mostly-adequate-guide-to-functional-programming.pdf
60-
mostly-adequate-guide-to-functional-programming.epub
67+
${{ env.BOOK_FILENAME }}.pdf
68+
${{ env.BOOK_FILENAME }}.epub

SUMMARY.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,17 @@
8585
* [No Law and Order](ch12.md#no-law-and-order)
8686
* [In Summary](ch12.md#in-summary)
8787
* [Exercises](ch12.md#exercises)
88+
* [Chapter 13: Monoids bring it all together](ch13.md)
89+
* [Wild combination](ch13.md#wild-combination)
90+
* [Abstracting addition](ch13.md#abstracting-addition)
91+
* [All my favourite functors are semigroups.](ch13.md#all-my-favourite-functors-are-semigroups)
92+
* [Monoids for nothing](ch13.md#monoids-for-nothing)
93+
* [Folding down the house](ch13.md#folding-down-the-house)
94+
* [Not quite a monoid](ch13.md#not-quite-a-monoid)
95+
* [Grand unifying theory](ch13.md#grand-unifying-theory)
96+
* [Group theory or Category theory?](ch13.md#group-theory-or-category-theory)
97+
* [In summary](ch13.md#in-summary)
98+
* [Exercises](ch13.md#exercises)
8899
* [Appendix A: Essential Functions Support](appendix_a.md)
89100
* [always](appendix_a.md#always)
90101
* [compose](appendix_a.md#compose)
@@ -93,7 +104,8 @@
93104
* [identity](appendix_a.md#identity)
94105
* [inspect](appendix_a.md#inspect)
95106
* [left](appendix_a.md#left)
96-
* [liftA\*](appendix_a.md#lifta)
107+
* [liftA2](appendix_a.md#lifta2)
108+
* [liftA3](appendix_a.md#lifta3)
97109
* [maybe](appendix_a.md#maybe)
98110
* [nothing](appendix_a.md#nothing)
99111
* [reject](appendix_a.md#reject)
@@ -124,6 +136,7 @@
124136
* [prop](appendix_c.md#prop)
125137
* [reduce](appendix_c.md#reduce)
126138
* [replace](appendix_c.md#replace)
139+
* [reverse](appendix_c.md#reverse)
127140
* [safeHead](appendix_c.md#safehead)
128141
* [safeLast](appendix_c.md#safelast)
129142
* [safeProp](appendix_c.md#safeprop)

book.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"cover": "images/cover.png",
66
"plugins": [
77
"exercises@git+https://github.com/MostlyAdequate/plugin-exercises.git",
8-
"include-codeblock@3.1.2"
8+
"include-codeblock@3.2.2"
99
]
1010
}
11+

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "The Mostly Adequate Guide to Functional Programming",
55
"dependencies": {
66
"gitbook-plugin-include-codeblock": "^3.2.2",
7-
"gitbook-plugin-exercises": "MostlyAdequate/plugin-exercises"
7+
"gitbook-plugin-exercises": "git+https://github.com/MostlyAdequate/plugin-exercises.git"
88
},
99
"devDependencies": {
1010
"gitbook-cli": "^2.3.2"

0 commit comments

Comments
 (0)