automatic building of asciidoctor documentation

This commit is contained in:
Emil Dotchevski 2018-12-20 16:25:35 -08:00
parent 598bad11a0
commit 623e344a33
7 changed files with 50 additions and 16 deletions

View File

@ -83,8 +83,18 @@ install:
script:
- |-
echo "using $TOOLSET : : $COMPILER : <cxxflags>-std=$CXXSTD ;" > ~/user-config.jam
echo -e "using $TOOLSET : : $COMPILER : <cxxflags>-std=$CXXSTD ;\nusing asciidoctor ;" > ~/user-config.jam
- ./b2 libs/qvm/test toolset=$TOOLSET
- ./b2 libs/qvm/doc
deploy:
local-dir: libs/qvm/doc/html/index.html
provider: pages
skip-cleanup: true
github-token: $GH_PAGES_TOKEN
keep-history: false
on:
branch: master
notifications:
email:

View File

@ -1,14 +0,0 @@
#!/bin/bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
asciidoctor README.adoc -o ../index1.html
cd ..
git checkout gh-pages
git pull
rm -f index.html
mv index1.html index.html
git add -u index.html
git commit -m "documentation update"
git push
git checkout master

2
doc/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/html/
/pdf/

25
doc/Jamfile Normal file
View File

@ -0,0 +1,25 @@
# Copyright 2017 Peter Dimov
# Copyright 2018 Emil Dotchevski
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
project doc/qvm ;
import asciidoctor ;
html index.html : qvm.adoc ;
install html_ : index.html : <location>html ;
pdf qvm.pdf : qvm.adoc ;
explicit qvm.pdf ;
install pdf_ : qvm.pdf : <location>pdf ;
explicit pdf_ ;
alias boostdoc ;
explicit boostdoc ;
alias boostrelease : html_ ;
explicit boostrelease ;

View File

@ -7,7 +7,7 @@
Generic {CPP} library for working with Quaternions Vectors and Matrices
:toclevels: 3
:toc: left
:toc-title: Boost QVM
:toc-title: QVM
:sectnumlevels: 2
:keywords: c++, boost, matrix, vector, quaternion

11
index.html Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv=refresh content="0; URL=doc/html/qvm.html">
<title>Automatic redirection</title>
</head>
<body>
Automatic redirection failed, please go to
<a href="doc/html/index.html">QVM</a>.&nbsp;<hr>
</body>
</html>