dockerize docs building

This commit is contained in:
Stefano Franz 2019-01-28 16:00:05 +00:00 committed by Stefano Franz
parent 365471d9f4
commit fe0cafd06e
3 changed files with 11 additions and 10 deletions

3
docs/.gitattributes vendored Normal file
View File

@ -0,0 +1,3 @@
# Set line endings to LF, even on Windows. Otherwise, execution within Docker fails.
# See https://help.github.com/articles/dealing-with-line-endings/
*.sh text eol=lf

View File

@ -62,16 +62,8 @@ task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
task buildDocs(dependsOn: ['apidocs', 'makeDocs'])
task apidocs(dependsOn: ['dokka', 'dokkaJavadoc'])
task makeDocs(type: Exec, dependsOn: ['installDocsiteRequirements']) {
// TODO: Non-msys Windows script
commandLine 'cmd', '/c', 'bash make-docsite.sh' // Windows
commandLine 'bash', './make-docsite.sh' // Linux
}
task installDocsiteRequirements(type: Exec) {
// TODO: Non-msys Windows script
commandLine 'cmd', '/c', 'bash install-docsite-requirements.sh' // Windows
commandLine 'bash', './install-docsite-requirements.sh' // Linux
task makeDocs(type: Exec) {
commandLine "docker", "run", "-v", "${project.projectDir}:/opt/docs_builder", "roastario/docs-builder:latest", "bash", "-c", "rm -rf build && rm -rf virtualenv && install-docsite-requirements.sh && make-docsite.sh"
}
apidocs.shouldRunAfter makeDocs

View File

@ -0,0 +1,6 @@
FROM python:2-stretch
RUN apt-get update && apt-get install -y texlive preview-latex-style texlive-generic-extra texlive-latex-extra latexmk dos2unix
VOLUME /opt/docs_builder
ENV PATH="/opt/docs_builder:${PATH}"
WORKDIR /opt/docs_builder