summaryrefslogtreecommitdiff
path: root/docker/docs-build/run.sh
blob: 33ba8a1afc44289f396571e9bfaef41b241e128d (plain)
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
#!/bin/sh

set -eu

# Instead of git clone, use this pre-built function

fetch () {
  git clean -fdx
  git fetch
  # reset to updated upstream branch, but only if we're tracking a branch
  branch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo head)
  git reset --hard "$branch"
}

cd /home/docbuilder/docs/

fetch 

# Execute the container 2 times, and compile html and Latex pdf files

docker run -v /home/docbuilder/docs:/docs taler-docs-image make html

docker run -v /home/docbuilder/docs:/docs taler-docs-image make latexpdf

# COPY data from container volume -> to the server (html and pdf files)

cp -r _build/html/* /home/docbuilder/build/docs/html
cp -r _build/latex/*.pdf /home/docbuilder/build/docs/pdf