forked from basarat/typescript-book
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.15 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
name: build ebook
on:
push:
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
- run: sudo apt update
- run: sudo apt install calibre-bin
- 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