1
0
mirror of https://github.com/tomav/docker-mailserver.git synced 2024-07-01 05:31:36 +02:00
docker-mailserver/.github/workflows/scripts/docs/build-docs.sh
Brennan Kinney 19b72aead3
docs: Update docs builder image (#3516)
- Bump to release `9.2.x`
- Image now has `MAJOR.MINOR` tag support to pull latest `PATCH` versions.
2023-08-29 23:33:39 +12:00

22 lines
718 B
Bash
Executable File

#!/bin/bash
set -ex
# PWD should be at the project docs/ folder.
# `--user` is required for build output file ownership to match the CI user,
# instead of the internal root user of the container.
# `build --strict` ensures the build fails when any warnings are omitted.
docker run \
--rm \
--user "$(id -u):$(id -g)" \
--volume "${PWD}:/docs" \
--name "build-docs" \
squidfunk/mkdocs-material:9.2 build --strict
# Remove unnecessary build artifacts: https://github.com/squidfunk/mkdocs-material/issues/2519
# site/ is the build output folder.
cd site
find . -type f -name '*.min.js.map' -delete -o -name '*.min.css.map' -delete
rm sitemap.xml.gz
rm assets/images/favicon.png
rm -r assets/javascripts/lunr