Build and deploy rustdoc, man pages, subplot.

- Fixes #60.
This commit is contained in:
Justus Winter 2024-01-08 17:34:00 +01:00
parent 0588bbedb1
commit 891cc859e0
No known key found for this signature in database
GPG Key ID: 686F55B4AB2B3386

View File

@ -2,6 +2,7 @@ stages:
- pre-check
- build
- test
- deploy
# These stanzas do some common management tasks before and after the
# job-specific before_script and after_script stanzas are run.
@ -233,6 +234,32 @@ docker-build-push:
IMAGE: "$CI_REGISTRY/sequoia-pgp/sequoia-sq"
DOCKER_HOST: tcp://docker:2376
pages:
stage: deploy
image: 192.168.122.1:5000/sequoia-pgp/build-docker-image/trixie-pandoc:latest
script:
- ASSET_OUT_DIR=/tmp/assets cargo doc --no-deps -p sequoia-sq
- mkdir public
- mv -v target/doc public/impl
- ( cd /tmp/assets/man-pages; for M in *; do pandoc -s $M | sed -e 's|<strong>\([^<]*\)</strong>(1)|<a href="\1.1.html">\1(1)</a>|g' >$M.html ; done )
- mkdir public/man
- mv -v /tmp/assets/man-pages/*.html public/man
- mkdir public/subplot
- pandoc -s -o public/subplot/sq-subplot.html sq-subplot.md
- pandoc -s -o public/subplot/sq-subplot.pdf sq-subplot.md
- echo "/sequoia-sq/ /sequoia-sq/man/sq.1.html 302" > public/_redirects
- echo "/sequoia-sq/impl /sequoia-sq/impl/sq/index.html 302" > public/_redirects
- echo "/sequoia-sq/man /sequoia-sq/man/sq.1.html 302" > public/_redirects
- echo "/sequoia-sq/subplot /sequoia-sq/subplot/sq-subplot.html 302" >> public/_redirects
artifacts:
paths:
- public
only:
- main
variables:
DEBIAN_FRONTEND: noninteractive
CARGO_HOME: $CI_PROJECT_DIR/../cargo