-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
42 lines (42 loc) · 1.22 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
distribution: xenial
language: node_js
node_js:
- "10"
services:
- docker
addons:
apt:
packages:
- jq
before_script:
- pip install --user yq
- export ANTORA_COMPONENT_NAME="$(yq -r .name antora.yml)"
- export ANTORA_COMPONENT_VERSION="$(yq -r .version antora.yml)"
- export COMPONENT_NAME=$(yq -r '.name|.[3:]|sub("-";"_";"g")' antora.yml)
- export COMPONENT_LANGUAGE=$(yq -r '.name|.[0:2]' antora.yml)
- cd preview
- npm install
- export SUFFIX=".git"
- export REPOSITORY_URL=$TRAVIS_REPO_SLUG$SUFFIX
- echo $REPOSITORY_URL
- gulp playbook
- docker build -t wp .
script:
- node_modules/.bin/antora --stacktrace --fetch --html-url-extension-style=indexify site.patched.yml
- export HTML_FILE="$ANTORA_COMPONENT_NAME/$ANTORA_COMPONENT_VERSION/PDF/index.html"
- export PDF_FILE="/build/doc.pdf"
- export DOCKER_COMMAND="weasyprint -p $HTML_FILE $PDF_FILE"
- echo $DOCKER_COMMAND
- docker run --mount type=bind,source="$(pwd)"/build,target=/build --workdir /build wp $DOCKER_COMMAND
- ls -l build
before_deploy:
- export TRAVIS_TAG=latest
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file:
- build/doc.pdf
skip_cleanup: true
on:
repo: $TRAVIS_REPO_SLUG
overwrite: true