-
Notifications
You must be signed in to change notification settings - Fork 2.6k
44 lines (42 loc) · 1.34 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: build ebook
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
env:
SHA: ${{ github.sha }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.18.2'
- run: sudo apt update
- run: sudo apt install libegl1 libopengl0 libxcb-cursor-dev
- run: sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
- run: sudo npm install -g gitbook-cli
- run: gitbook install
- run: mkdir output
- run: gitbook pdf . ./output/typescript-book-${SHA}.pdf
- run: gitbook epub . ./output/typescript-book-${SHA}.epub
- run: gitbook mobi . ./output/typescript-book-${SHA}.mobi
- name: upload pdf artifact
uses: actions/upload-artifact@v1
with:
name: typescript-book.pdf
path: output/typescript-book-${{ env.SHA }}.pdf
- name: upload epub artifact
uses: actions/upload-artifact@v1
with:
name: typescript-book.epub
path: output/typescript-book-${{ env.SHA }}.epub
- name: upload mobi artifact
uses: actions/upload-artifact@v1
with:
name: typescript-book.mobi
path: output/typescript-book-${{ env.SHA }}.mobi