-
-
Notifications
You must be signed in to change notification settings - Fork 12
38 lines (37 loc) · 1.17 KB
/
deploy.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
name: deploy
on:
push:
branches:
- master
jobs:
test:
name: "Test on Node.js ${{ matrix.node-version }}"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12]
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm install
- name: Build
run: npm run build
- name: Test
run: npm test
- name: Build ebook
run: |
docker build . -t honkit
docker run -v `pwd`:`pwd` -w `pwd` honkit node_modules/.bin/honkit pdf . _book/JavaScript-Plugin-Architecture.pdf
docker run -v `pwd`:`pwd` -w `pwd` honkit node_modules/.bin/honkit epub . _book/JavaScript-Plugin-Architecture.epub
docker run -v `pwd`:`pwd` -w `pwd` honkit node_modules/.bin/honkit mobi . _book/JavaScript-Plugin-Architecture.mobi
ls _book
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_book