forked from gitenberg-dev/templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
44 lines (40 loc) · 1.47 KB
/
.travis.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
sudo: required
dist: trusty
language: ruby
before_install:
- gem install asciidoctor -v 1.5.2
- gem install tilt
- sudo pip install git+https://github.com/rdhyee/ebooklib.git
script:
- VERSION=`ruby -e "require 'yaml'; meta = YAML.load_file('metadata.yaml'); puts meta['_version'];"`
- git clone https://github.com/gitenberg-dev/asciidoctor-htmlbook.git
- sudo pip install -r asciidoctor-htmlbook/gitberg-machine/requirements.txt
- asciidoctor -a toc,idprefix=xx_,version=$VERSION -b xhtml5 -T ./asciidoctor-htmlbook/htmlbook-autogen/
-d book book.asciidoc -o book.html
- git clone https://github.com/gitenberg-dev/HTMLBook
# make book.html available to jinja2 environment by putting it into templates
- cp book.html asciidoctor-htmlbook/gitberg-machine/templates/
- /usr/bin/python asciidoctor-htmlbook/gitberg-machine/machine.py -o . -m metadata.yaml book.html
- xsltproc -stringparam external.assets.list " " ./HTMLBook/htmlbook-xsl/epub.xsl book.html
- cp ./HTMLBook/stylesheets/epub/epub.css OEBPS
- cp cover.jpg OEBPS/cover.jpg
- if test -d "./images"; then mv ./images ./OEBPS/ ;fi
- zip -rX book.epub mimetype
- zip -rX book.epub OEBPS/ META-INF/
- if test -d "OEBPS/images/"; then zip -rX book.epub OEBPS/images/ ;fi
- mv book.epub {{epub_title}}epub
branches:
only:
- master
deploy:
skip_cleanup: true
provider: releases
api_key:
secure: {{encrypted_key}}
file: {{epub_title}}.epub
"on":
repo: GITenberg/{{repo_name}}
addons:
apt:
packages:
- xsltproc