diff options
Diffstat (limited to '.github/ci/book.sh')
| -rw-r--r-- | .github/ci/book.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.github/ci/book.sh b/.github/ci/book.sh new file mode 100644 index 000000000..285cdc8fa --- /dev/null +++ b/.github/ci/book.sh | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | ## on push branch=main | ||
| 3 | |||
| 4 | set -euxo pipefail | ||
| 5 | |||
| 6 | make -C docs | ||
| 7 | |||
| 8 | export KUBECONFIG=/ci/secrets/kubeconfig.yml | ||
| 9 | POD=$(kubectl -n embassy get po -l app=website -o jsonpath={.items[0].metadata.name}) | ||
| 10 | |||
| 11 | mkdir -p build | ||
| 12 | mv docs/book build/book | ||
| 13 | tar -C build -cf book.tar book | ||
| 14 | kubectl exec $POD -- mkdir -p /usr/share/nginx/html | ||
| 15 | kubectl cp book.tar $POD:/usr/share/nginx/html/ | ||
| 16 | kubectl exec $POD -- find /usr/share/nginx/html | ||
| 17 | kubectl exec $POD -- tar -C /usr/share/nginx/html -xvf /usr/share/nginx/html/book.tar | ||
